[compiler-rt] r346194 - Follow Windows' approach for NetBSD in AlarmCallback()
Kamil Rytarowski via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 5 17:28:01 PST 2018
Author: kamil
Date: Mon Nov 5 17:28:01 2018
New Revision: 346194
URL: http://llvm.org/viewvc/llvm-project?rev=346194&view=rev
Log:
Follow Windows' approach for NetBSD in AlarmCallback()
NetBSD's current behavior needs to ignore check for
InFuzzingThread() in Fuzzer::AlarmCallback().
Modified:
compiler-rt/trunk/lib/fuzzer/FuzzerLoop.cpp
Modified: compiler-rt/trunk/lib/fuzzer/FuzzerLoop.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/fuzzer/FuzzerLoop.cpp?rev=346194&r1=346193&r2=346194&view=diff
==============================================================================
--- compiler-rt/trunk/lib/fuzzer/FuzzerLoop.cpp (original)
+++ compiler-rt/trunk/lib/fuzzer/FuzzerLoop.cpp Mon Nov 5 17:28:01 2018
@@ -275,7 +275,8 @@ NO_SANITIZE_MEMORY
void Fuzzer::AlarmCallback() {
assert(Options.UnitTimeoutSec > 0);
// In Windows Alarm callback is executed by a different thread.
-#if !LIBFUZZER_WINDOWS
+ // NetBSD's current behavior needs this change too.
+#if !LIBFUZZER_WINDOWS && !LIBFUZZER_NETBSD
if (!InFuzzingThread())
return;
#endif
More information about the llvm-commits
mailing list