summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2018-11-06 01:28:01 +0000
committerKamil Rytarowski <n54@gmx.com>2018-11-06 01:28:01 +0000
commit2e61186c4201dc3c0dba961f1ddc4c928b2fc50c (patch)
treec8d4dfb7dd727a6de3b9551b533ffdccbef621fd /compiler-rt/lib/fuzzer
parentfd68e3e2e3f57f304f529fb001d30ce0eed54933 (diff)
downloadbcm5719-llvm-2e61186c4201dc3c0dba961f1ddc4c928b2fc50c.tar.gz
bcm5719-llvm-2e61186c4201dc3c0dba961f1ddc4c928b2fc50c.zip
Follow Windows' approach for NetBSD in AlarmCallback()
NetBSD's current behavior needs to ignore check for InFuzzingThread() in Fuzzer::AlarmCallback(). llvm-svn: 346194
Diffstat (limited to 'compiler-rt/lib/fuzzer')
-rw-r--r--compiler-rt/lib/fuzzer/FuzzerLoop.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerLoop.cpp b/compiler-rt/lib/fuzzer/FuzzerLoop.cpp
index 7b98f55ae46..09c57c3f6b7 100644
--- a/compiler-rt/lib/fuzzer/FuzzerLoop.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerLoop.cpp
@@ -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
OpenPOWER on IntegriCloud