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

Alexey Samsonov samsonov at google.com
Tue Nov 12 03:53:02 PST 2013



================
Comment at: lib/asan/lit_tests/TestCases/Linux/malloc_delete_mismatch.cc:1
@@ -1,2 +1,2 @@
 // Check that we detect malloc/delete mismatch only if the approptiate flag
 // is set.
----------------
Yury Gribov wrote:
> Alexey Samsonov wrote:
> > I'd also appreciate at least one cross-platform test case (i.e. not Linux-only).
> Ok, will take some time to setup VS here.
Oh, I don't think any of our lit tests can be run by VS, I've meant just test cases in lib/asan/lit_tests/TestCases that are executed by both Linux and Mac.

================
Comment at: lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc:20
@@ -19,1 +19,3 @@
                         uptr stack_bottom, bool request_fast_unwind) {
+  top_frame_bp = bp;
+
----------------
Yury Gribov wrote:
> Alexey Samsonov wrote:
> > You may assign this only if size of unwinded stack is greater than zero.
> I'll replace with `top_frame_bp = size ? bp : 0;'.
Makes sense


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



More information about the llvm-commits mailing list