[PATCH] D19653: [tsan] Return 0 from malloc_size for non-malloc'd pointers
Mike Aizatsky via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 28 13:51:51 PDT 2016
aizatsky added a subscriber: aizatsky.
================
Comment at: lib/tsan/rtl/tsan_mman.cc:167
@@ -166,2 +166,3 @@
MBlock *b = ctx->metamap.GetBlock((uptr)p);
- return b ? b->siz : 0;
+ if (!b)
+ return 0; // Not a valid pointer.
----------------
this changes behavior on all platforms, not only Mac, right? Is it intended?
http://reviews.llvm.org/D19653
More information about the llvm-commits
mailing list