[PATCH] D12318: [ASan] Enable optional ASan recovery
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 15:09:32 PDT 2015
eugenis added inline comments.
================
Comment at: lib/asan/asan_report.cc:649
@@ +648,3 @@
+ // Try to wait for other thread to finish reporting.
+ for (int retry = 0; retry < 5; ++retry) {
+ SleepForSeconds(5);
----------------
I think this timeout complicates things without any benefit. Why not wait indefinitely?
I think the logic should be like this:
1. if the current thread is already reporting, die immediately
2. if (recover) {lock()} else { if (!try_lock()) sleep(inf) }
3. report
4. unlock()
================
Comment at: lib/asan/asan_report.cc:1006-1007
@@ -960,9 +1005,4 @@
-} // namespace __asan
-
-// --------------------------- Interface --------------------- {{{1
-using namespace __asan; // NOLINT
-
-void __asan_report_error(uptr pc, uptr bp, uptr sp, uptr addr, int is_write,
- uptr access_size, u32 exp) {
+void ReportGenericError(uptr pc, uptr bp, uptr sp, uptr addr, bool is_write,
+ uptr access_size, u32 exp, bool fatal) {
ENABLE_FRAME_POINTER;
----------------
I agree, if the outside caller thinks the error is fatal, it can just abort() or something.
Repository:
rL LLVM
http://reviews.llvm.org/D12318
More information about the llvm-commits
mailing list