Email or username:

Password:

Forgot your password?
3 posts total
nil :demisexual_flag: (U) [!].7z

oh my fucking god. so i was having a problem when i enabled optimizations when compiling the doom port. memcpy ended up overwriting itself. so i looked into what was happening, and apparently memcpy just kept calling itself over and over. the reason? i was compiling my own version of memcpy, because i wasn't using the standard library, but i also didn't use the "-ffreestanding" flag, so gcc assumed i *did* have the standard library. so gcc, in its infinite wisdom, saw a memcpy-like pattern in my memcpy and turned it into another call to memcpy, resulting in a stack overflow.

oh my fucking god. so i was having a problem when i enabled optimizations when compiling the doom port. memcpy ended up overwriting itself. so i looked into what was happening, and apparently memcpy just kept calling itself over and over. the reason? i was compiling my own version of memcpy, because i wasn't using the standard library, but i also didn't use the "-ffreestanding" flag, so gcc assumed i *did* have the standard library. so gcc, in its infinite wisdom, saw a memcpy-like pattern in my...

Show previous comments
Resuna

@nil

> gcc, in its infinite wisdom, saw a memcpy-like pattern in my memcpy and turned it into another call to memcpy,

Insert Jurassic Park quotes here.

Ben Hutchings

@nil You can also use -fno-builtin-memcpy to disable this optimisation (and similar options for other standard library functions)

Panegyr 🤡🎪

@nil before I look into it more does this pose any issues to systems with CFW or anyone wanting to install CFW on their 3DS in the future?

Ah damn it seems it hinders cfw installation at present using existing methods

Noplexa

@nil@furry.engineer what does it do (except breaking CFW probably)?

Go Up