[compiler-rt] r217215 - [asan] relax the assertion around array cookie load; still need to extract a reproducer where this assertion fails...
Kostya Serebryany
kcc at google.com
Thu Sep 4 18:16:30 PDT 2014
Author: kcc
Date: Thu Sep 4 20:16:30 2014
New Revision: 217215
URL: http://llvm.org/viewvc/llvm-project?rev=217215&view=rev
Log:
[asan] relax the assertion around array cookie load; still need to extract a reproducer where this assertion fails...
Modified:
compiler-rt/trunk/lib/asan/asan_poisoning.cc
Modified: compiler-rt/trunk/lib/asan/asan_poisoning.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_poisoning.cc?rev=217215&r1=217214&r2=217215&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_poisoning.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_poisoning.cc Thu Sep 4 20:16:30 2014
@@ -246,10 +246,14 @@ uptr __asan_load_cxx_array_cookie(uptr *
// which means that we are going to get double-free. So, return 0 to avoid
// infinite loop of destructors. We don't want to report a double-free here
// though, so print a warning just in case.
- CHECK_EQ(sval, kAsanHeapFreeMagic);
- Report("AddressSanitizer: loaded array cookie from free-d memory; "
- "expect a double-free report\n");
- return 0;
+ // CHECK_EQ(sval, kAsanHeapFreeMagic);
+ if (sval == kAsanHeapFreeMagic) {
+ Report("AddressSanitizer: loaded array cookie from free-d memory; "
+ "expect a double-free report\n");
+ return 0;
+ }
+ // FIXME: apparently it can be something else; need to find a reproducer.
+ return *p;
}
// This is a simplified version of __asan_(un)poison_memory_region, which
More information about the llvm-commits
mailing list