diff options
author | Joel Galenson <jgalenson@google.com> | 2021-04-01 17:09:16 -0700 |
---|---|---|
committer | Joel Galenson <jgalenson@google.com> | 2021-04-01 17:09:16 -0700 |
commit | d1325ea49959305aec6fa54768f6d694aae3e4b7 (patch) | |
tree | b40cfd9e8802b2879a81663220a69c0d24691ebf /libfuzzer/FuzzerUtilFuchsia.cpp | |
parent | 31b9bb6b3b73523edfbea46e3e490e403c1a17d4 (diff) | |
download | libfuzzer-sys-d1325ea49959305aec6fa54768f6d694aae3e4b7.tar.gz |
Upgrade rust/crates/libfuzzer-sys to 0.4.0android-s-beta-2android-s-beta-1
Test: make
Change-Id: I0411b0aba37380808fc84ad2dfcde2f57560e789
Diffstat (limited to 'libfuzzer/FuzzerUtilFuchsia.cpp')
-rw-r--r-- | libfuzzer/FuzzerUtilFuchsia.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/libfuzzer/FuzzerUtilFuchsia.cpp b/libfuzzer/FuzzerUtilFuchsia.cpp index 190fb78..af43946 100644 --- a/libfuzzer/FuzzerUtilFuchsia.cpp +++ b/libfuzzer/FuzzerUtilFuchsia.cpp @@ -68,17 +68,6 @@ void AlarmHandler(int Seconds) { } } -void InterruptHandler() { - fd_set readfds; - // Ctrl-C sends ETX in Zircon. - do { - FD_ZERO(&readfds); - FD_SET(STDIN_FILENO, &readfds); - select(STDIN_FILENO + 1, &readfds, nullptr, nullptr, nullptr); - } while(!FD_ISSET(STDIN_FILENO, &readfds) || getchar() != 0x03); - Fuzzer::StaticInterruptCallback(); -} - // CFAOffset is used to reference the stack pointer before entering the // trampoline (Stack Pointer + CFAOffset = prev Stack Pointer). Before jumping // to the trampoline we copy all the registers onto the stack. We need to make @@ -354,16 +343,12 @@ void SetSignalHandler(const FuzzingOptions &Options) { Printf("%s", Buf); // Set up alarm handler if needed. - if (Options.UnitTimeoutSec > 0) { + if (Options.HandleAlrm && Options.UnitTimeoutSec > 0) { std::thread T(AlarmHandler, Options.UnitTimeoutSec / 2 + 1); T.detach(); } - // Set up interrupt handler if needed. - if (Options.HandleInt || Options.HandleTerm) { - std::thread T(InterruptHandler); - T.detach(); - } + // Options.HandleInt and Options.HandleTerm are not supported on Fuchsia // Early exit if no crash handler needed. if (!Options.HandleSegv && !Options.HandleBus && !Options.HandleIll && |