[llvm-commits] [PATCH] AddressSanitizer: runtime support for use-after-scope bugs.

Kostya Serebryany kcc at google.com
Wed Nov 28 22:40:01 PST 2012



================
Comment at: lib/asan/asan_poisoning.cc:170
@@ +169,3 @@
+void __asan_stack_poison_memory(uptr addr, uptr size) {
+  PoisonMemoryRegion(addr, size, kAsanStackUseAfterScopeMagic);
+}
----------------
Alexey Samsonov wrote:
> Kostya Serebryany wrote:
> > Isn't  PoisonMemoryRegion too complex for our task? 
> > With use-after-scope we are dealing with the allocas that are created by the asan pass, and so they are properly aligned on both ends. 
> Why is it? If the memory region is aligned, we just skip special cases for ends of region and do a plain memset.
This function is going to be a hotspot. 
Why spend time on the ifs that are never true? 


http://llvm-reviews.chandlerc.com/D141



More information about the llvm-commits mailing list