libretro / pcsx_rearmed

ARM optimized PCSX fork
GNU General Public License v2.0
164 stars 116 forks source link

Address sanitizer #802

Closed pcercuei closed 7 months ago

pcercuei commented 7 months ago

Enable GCC's (or LLVM's) Address Sanitizer when DEBUG=1 is set.

As it says in the commit message, this is not available everywhere, so if you think it's a problem I can enable it through a "DEBUG_ASAN" variable or something like that.

It detects a lot of problems, one of which I fixed in Lightrec in PR #801, another one in the frontend that I fixed here.

It detects other issues, notably in the SPU plugin (reproducible in Duke Nukem Total Meltdon, boot the game and leave it running until the emulator exits) that have yet to be fixed.

notaz commented 7 months ago

As it says in the commit message, this is not available everywhere, so if you think it's a problem I can enable it through a "DEBUG_ASAN" variable or something like that.

Yes please, since the emu targets older hw it's not uncommon to have to use old compilers too. Also we may want to run asan with optimized build too.

pcercuei commented 7 months ago

@notaz Ok, will do.

pcercuei commented 7 months ago

Updated.