Fixes https://github.com/google/sanitizers/issues/788/, a deadlock
caused by multiple crashes happening at the same time. Before printing
a crash report, we now test and set an atomic flag. If the flag was
already set, the crash handler returns immediately.
Details
Diff Detail
- Build Status
Buildable 17544 Build 17544: arc lint + arc unit
Event Timeline
compiler-rt/lib/asan/asan_report.cc | ||
---|---|---|
137 | Will check-asan pass with this? | |
compiler-rt/lib/fuzzer/FuzzerTracePC.cpp | ||
382 | I was thinking about implementing this function in sanitizer_common, and not making it weak. |
compiler-rt/lib/asan/asan_report.cc | ||
---|---|---|
137 | I would rather define this function (non-weak) in sanitizer_common and check halt_on_error_ before calling it there. |
compiler-rt/lib/sanitizer_common/sanitizer_common.cc | ||
---|---|---|
352 | redundant empty line | |
compiler-rt/lib/sanitizer_common/sanitizer_interface_internal.h | ||
65 | Since this is used by libFuzzer, it's not an internal interface, but a public one, so move it to include/sanitizer/common_interface_defs.h | |
compiler-rt/test/fuzzer/AcquireCrashStateTest.cpp | ||
11 | Instead of this, include sanitizer/common_interface_defs.h |
compiler-rt/lib/sanitizer_common/sanitizer_interface_internal.h | ||
---|---|---|
65 | Still kept this declaration also, following the pattern of other public interfaces that are defined internally. |
Will check-asan pass with this?
__sanitizer_acquire_crash_state is weak, and is not defined w/o libFuzzer, so you should get a null deref here. No?