[PATCH] [ASan] Do not rely on malloc context in allocator reports

Alexey Samsonov samsonov at google.com
Mon Nov 11 06:35:56 PST 2013


  (just in case - don't forget to upload updated version after the fixes, via "arc diff --update" or via web interface).


================
Comment at: lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc:22
@@ +21,3 @@
+
+  if (!max_depth) {
+    trace[0] = pc;
----------------
Yury Gribov wrote:
> Alexey Samsonov wrote:
> > Why do you need this?
> I need pc to unwind stack in Report*. Without this code pc will be lost if max_depth is zero (i.e. in case ASAN_OPTIONS=malloc_context_size=0).
We ensure that malloc_context_size is at least 1 when we parse runtime flags (i.e. this shouldn't be responsibility of stack trace unwinder, but of its caller).


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



More information about the llvm-commits mailing list