Email or username:

Password:

Forgot your password?
4 posts total
Show previous comments
divVerent
@nil Protip: set the year to 1997, which has the same week days and leap year rules as 2025. ;)
BardMoss the Linux Guy

@nil that might explain why the Los Angeles Police Department systems shut down because their systems won't work beyond 2024...

nil :demisexual_flag:

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...

RISC-V assembly of a function called memcpy, which just calls itself.
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