[PATCH] D46277: [libFuzzer] Report at most one crash per input.

Kostya Serebryany via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 1 12:51:53 PDT 2018


kcc added inline comments.


================
Comment at: compiler-rt/lib/asan/asan_report.cc:137
   ~ScopedInErrorReport() {
+    if (!__sanitizer_acquire_crash_state()) {
+      asanThreadRegistry().Unlock();
----------------
morehouse wrote:
> kcc wrote:
> > 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? 
> check-asan passes.  This is defined weakly in sanitizer_common.cc, so it shouldn't be a nullptr.
I would rather define this function (non-weak) in sanitizer_common and check `halt_on_error_` before calling it there. 
This will make it work with the recovery mode. Right? 


https://reviews.llvm.org/D46277





More information about the llvm-commits mailing list