isoalloc
isoalloc copied to clipboard
Enable sanitizers in the testsuite
It would be nice to enable things like -fsanitize=undefined and -fsanitize=leak, to catch weird™ things.
UBSan should already be supported via ENABLE_UBSAN and there is a built in leak detector via iso_alloc_detect_leaks. I'd have to look into how -fsanitize=leak would work with IsoAlloc. You can add the flag to CFlags and things will run but I'd need to look at the implementation to ensure its not bypassing IsoAlloc interfaces.
Did some quick research here and LeakSanitizer does not look compatible with IsoAlloc today.
Can you please elaborate/add a note somewhere about why it's incompatible?
LSan intercepts malloc/free and replaces it. It's not intended to be used with other allocators.
https://github.com/llvm/llvm-project/tree/2e999b7dd1934a44d38c3a753460f1e5a217e9a5/compiler-rt/lib/lsan