[PATCH] D28173: [asan] Use exact comparison in BufferedStackTrace::LocatePcInTrace

Evgeniy Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 4 16:59:18 PST 2017


eugenis added a comment.

Sorry, I still don't like this.
You are basically fixing up the stack trace so it can be reliably re-unwound, but this fixup only holds in the callees of the current function, and it's not clear what the exact set of functions need this and how to maintain this in the future.

As I see it, the problem is not really with the stack trace itself. We are replacing it with a better trace later anyway. The problem is to keep enough information to trim the new trace at the right point.

When malloc_context_size > 1, exact matching trace[1] and then stepping back should work strictly better than the current code. When malloc_context_size<=1, we can keep the current behavior, or add a new field to store caller-pc from the interceptor PoV.



================
Comment at: lib/asan/asan_stack.h:63
 
+void GetStackTraceWithPcBpAndContext(BufferedStackTrace *stack, uptr max_depth,
+                                     uptr bp, void *context,
----------------
Please rename to GetStackTraceWithCurrentPcBpAndContext, or something like that


https://reviews.llvm.org/D28173





More information about the llvm-commits mailing list