← Back to context

Comment by AssKoala

8 hours ago

This was a PS2 game and codebase.

MSan didn’t exist at the time and valgrind doesn’t work on a ps2.

Neither of those are necessary to find this bug as it could be found using a stomp allocator if you’re a developer on the project at the time.

How could a stomp allocator have possibly found this bug? The offending values are stored on the stack, in-bounds when written to, and again in-bounds when read from.

At no point is there an OOB access, just a failure to initialize stack variables. And to catch that, you'd need either MSan-style shadow state that didn't exist, thorough playtesting with fine-grained stack randomization, or some sort of poisoning that I don't think existed.