From ad20adce1a245de76fc6124fb049344049f102ec Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Wed, 8 Feb 2017 21:39:55 +0100 Subject: [PATCH] fuzzer: Don't handle signals when fuzzing. Change-Id: I2febdf96bcbbd5c6edaf791d99a77674e6f0b0a9 --- kit/ChildSession.hpp | 1 - kit/ForKit.cpp | 2 ++ kit/Kit.cpp | 3 ++- wsd/LOOLWSD.cpp | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kit/ChildSession.hpp b/kit/ChildSession.hpp index 3eabc7476..da609b58e 100644 --- a/kit/ChildSession.hpp +++ b/kit/ChildSession.hpp @@ -16,7 +16,6 @@ #define LOK_USE_UNSTABLE_API #include -#include #include #include "Common.hpp" diff --git a/kit/ForKit.cpp b/kit/ForKit.cpp index 837812c56..6362940bf 100644 --- a/kit/ForKit.cpp +++ b/kit/ForKit.cpp @@ -334,8 +334,10 @@ int main(int argc, char** argv) } } +#ifndef FUZZER SigUtil::setFatalSignals(); SigUtil::setTerminationSignals(); +#endif // Initialization const bool logToFile = std::getenv("LOOL_LOGFILE"); diff --git a/kit/Kit.cpp b/kit/Kit.cpp index 79e6f55a0..ae56b6ed2 100644 --- a/kit/Kit.cpp +++ b/kit/Kit.cpp @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -1563,8 +1562,10 @@ void lokit_main(const std::string& childRoot, bool queryVersion, bool displayVersion) { +#ifndef FUZZER SigUtil::setFatalSignals(); SigUtil::setTerminationSignals(); +#endif Util::setThreadName("loolkit"); diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 941125585..24255df02 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -2314,8 +2314,10 @@ std::mutex Connection::Mutex; int LOOLWSD::main(const std::vector& /*args*/) { +#ifndef FUZZER SigUtil::setFatalSignals(); SigUtil::setTerminationSignals(); +#endif // down-pay all the forkit linking cost once & early. Environment::set("LD_BIND_NOW", "1");