From 27a22688b90c05f79087a24b6807ea5f1e6e4d39 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Mon, 19 Nov 2012 11:22:22 +0000 Subject: [PATCH] [ASan] use raw Exit() to kill the program in case ASan finds an error while reporting the error in the same thread llvm-svn: 168308 --- compiler-rt/lib/asan/asan_report.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler-rt/lib/asan/asan_report.cc b/compiler-rt/lib/asan/asan_report.cc index 2fbf8fd..78fbce3 100644 --- a/compiler-rt/lib/asan/asan_report.cc +++ b/compiler-rt/lib/asan/asan_report.cc @@ -289,7 +289,9 @@ class ScopedInErrorReport { // an error report will finish doing it. SleepForSeconds(Max(100, flags()->sleep_before_dying + 1)); } - Die(); + // If we're still not dead for some reason, use raw Exit() instead of + // Die() to bypass any additional checks. + Exit(flags()->exitcode); } __asan_on_error(); reporting_thread_tid = asanThreadRegistry().GetCurrentTidOrInvalid(); -- 2.7.4