diff options
author | Kamil Rytarowski <n54@gmx.com> | 2018-11-06 01:28:01 +0000 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2018-11-06 01:28:01 +0000 |
commit | 2e61186c4201dc3c0dba961f1ddc4c928b2fc50c (patch) | |
tree | c8d4dfb7dd727a6de3b9551b533ffdccbef621fd /compiler-rt/lib/fuzzer | |
parent | fd68e3e2e3f57f304f529fb001d30ce0eed54933 (diff) | |
download | bcm5719-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.cpp | 3 |
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 |