[PATCH] [ASan] Make stack-buffer-overflow reports more robust

Alexey Samsonov vonosmas at gmail.com
Wed Oct 1 13:14:43 PDT 2014

Testing this is hard. I've tested this change on a large program with racy use-after-return, and failed to reproduce this in a small test case.

Comment at: lib/asan/asan_report.cc:458
@@ -456,1 +457,3 @@
   // Report all objects in this frame.
+  const uptr kBufSize = 4095;
+  char buf[kBufSize];
kcc wrote:
> Isn't this buffer too large? (we may get stack overflow while reporting)
Yeah, we may get rid of this buffer completely. I'll address this in a separate change.


More information about the llvm-commits mailing list