[PATCH] asan: handle SIGABRT

Alexey Samsonov samsonov at google.com
Thu Jul 11 07:30:08 PDT 2013


  I'd rather avoid dealing with SIGABRT in ASan. Is there really no way to limit the size of the core dump on the systems you mention?


================
Comment at: lib/asan/asan_rtl.cc:151
@@ -154,2 +150,3 @@
   f->handle_segv = ASAN_NEEDS_SEGV;
+  f->handle_abrt = ASAN_NEEDS_SEGV;
   f->allow_user_segv_handler = false;
----------------
Why? I don't think SIGABRT handler should be on by default.

================
Comment at: lib/asan/asan_report.cc:526
@@ -525,1 +525,3 @@
 
+void ReportSIGABRT(uptr pc, uptr sp, uptr bp) {
+  Decorator d;
----------------
No, generally ASan should fail the program immediately after it prints the error report - that's why all "ReportFoo" functions are noreturn and we have ScopedInErrorReport object. Among the other things, it makes sure that no two error reports are printed simultaneously, otherwise bad things may happen - the code in "ReportFoo" functions is thread-unsafe.


http://llvm-reviews.chandlerc.com/D1123



More information about the llvm-commits mailing list