Hi AddressSanitizer developers, I’d like to selectively disable AddressSanitizer's poisoning/quarantine/filling for some memory allocations. I know I can exclude particular functions from being transformed using __attribute__((no_sanitize_address)). Is this also possible for particular memory allocations?
Otherwise, I've a few ideas for how this could be implemented: 1. Create a special heap area where the “unsafe” objects reside. The low level allocator for this region would not do any poisoning. 2. Introduce a way to tell the ASan allocator that an allocation should come from the unsafe region (I’m not sure how to do this… have a global flag for each thread, maybe?). 3. When allocating from the unsafe region, ASan would set the state in the object’s header to the new “UNSAFE” value, instead of “ALLOCATED”. It would otherwise behave as if heap poisoning were disabled. 4. When freeing an object, we would check the state in the chunk header. Unsafe objects would bypass the quarantine queue and be returned to the unsafe allocator directly. What are your thoughts about this? Is there a simpler way to do this? Looking forward to your thoughts! Best regards, Jonas -- You received this message because you are subscribed to the Google Groups "address-sanitizer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
