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

Alexey Samsonov samsonov at google.com
Thu Nov 29 14:08:51 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);
+}
----------------
Kostya Serebryany wrote:
> 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? 
Done


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



More information about the llvm-commits mailing list