[ASan] use raw Exit() to kill the program in case ASan finds an error while reporting...
authorAlexey Samsonov <samsonov@google.com>
Mon, 19 Nov 2012 11:22:22 +0000 (11:22 +0000)
committerAlexey Samsonov <samsonov@google.com>
Mon, 19 Nov 2012 11:22:22 +0000 (11:22 +0000)
llvm-svn: 168308

compiler-rt/lib/asan/asan_report.cc

index 2fbf8fd..78fbce3 100644 (file)
@@ -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();