[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:21:32 PDT 2018


kcc added inline comments.


================
Comment at: compiler-rt/lib/asan/asan_report.cc:137
   ~ScopedInErrorReport() {
+    if (!__sanitizer_acquire_crash_state()) {
+      asanThreadRegistry().Unlock();
----------------
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? 


================
Comment at: compiler-rt/lib/fuzzer/FuzzerTracePC.cpp:382
+ATTRIBUTE_NO_SANITIZE_ALL
+bool __sanitizer_acquire_crash_state() {
+  static std::atomic<bool> InCrashState(false);
----------------
I was thinking about implementing this function in sanitizer_common, and not making it weak. 


https://reviews.llvm.org/D46277





More information about the llvm-commits mailing list