summaryrefslogtreecommitdiffstats
path: root/compiler-rt
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2014-04-15 11:36:18 +0000
committerAlexander Potapenko <glider@google.com>2014-04-15 11:36:18 +0000
commit65a6c5701385e507318b5d1fe36bd4017caa5b58 (patch)
tree03ff6dca1b1ab5893ee616510883d997db9a8b6f /compiler-rt
parent1b4b6bac3bae0947ce8d56162f89c4fd333ca764 (diff)
downloadbcm5719-llvm-65a6c5701385e507318b5d1fe36bd4017caa5b58.tar.gz
bcm5719-llvm-65a6c5701385e507318b5d1fe36bd4017caa5b58.zip
[ASan] Replace a CHECK for mmap_limit_mb with a RAW_CHECK.
In the case of a CHECK failure the program tries to fork and launch llvm-symbolizer, but hangs in mz_force_lock because one of the allocator locks is already acquired. llvm-svn: 206274
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_common.cc2
-rw-r--r--compiler-rt/test/asan/TestCases/mmap_limit_mb.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common.cc b/compiler-rt/lib/sanitizer_common/sanitizer_common.cc
index d80564acde5..0eab824463d 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common.cc
@@ -254,7 +254,7 @@ void IncreaseTotalMmap(uptr size) {
// Since for now mmap_limit_mb is not a user-facing flag, just CHECK.
uptr mmap_limit_mb = common_flags()->mmap_limit_mb;
common_flags()->mmap_limit_mb = 0; // Allow mmap in CHECK.
- CHECK_LT(total_mmaped >> 20, mmap_limit_mb);
+ RAW_CHECK(total_mmaped >> 20 < mmap_limit_mb);
}
}
diff --git a/compiler-rt/test/asan/TestCases/mmap_limit_mb.cc b/compiler-rt/test/asan/TestCases/mmap_limit_mb.cc
index 9f708086dd3..5a2b573cf61 100644
--- a/compiler-rt/test/asan/TestCases/mmap_limit_mb.cc
+++ b/compiler-rt/test/asan/TestCases/mmap_limit_mb.cc
@@ -27,6 +27,6 @@ int main(int argc, char **argv) {
for (std::vector<char *>::const_iterator it = v.begin(); it != v.end(); ++it)
delete[](*it);
fprintf(stderr, "PASS\n");
- // CHECK: AddressSanitizer CHECK failed{{.*}}total_mmaped{{.*}}mmap_limit_mb
+ // CHECK: total_mmaped{{.*}}mmap_limit_mb
return 0;
}
OpenPOWER on IntegriCloud