The 2024 Wheel Reinvention Jam is in 16 days. September 23-29, 2024. More info

Address Sanitizer and warnings question

Yes, that is how I normally implement my page allocator before I know about ASAN. Does ASAN also implement similar things for calls to malloc/VirtualAlloc? If so then why though? I thought the shadow-byte mechanic was enough.


Replying to ratchetfreak (#30172)

ASAN's malloc/free replacements also use shadow-bytes. They have to malloc more memory than requested to make space for the redzones, and quarantine freed memory for "free". They explain it here: https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm#malloc


Edited by lackhoa on Reason: typo
Replying to longtran2904 (#30173)