From 65a6c5701385e507318b5d1fe36bd4017caa5b58 Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Tue, 15 Apr 2014 11:36:18 +0000 Subject: [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 --- compiler-rt/lib/sanitizer_common/sanitizer_common.cc | 2 +- compiler-rt/test/asan/TestCases/mmap_limit_mb.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler-rt') 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::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; } -- cgit v1.2.1