[Libreoffice-commits] online.git: 2 commits - kit/ChildSession.hpp kit/ForKit.cpp kit/Kit.cpp wsd/Admin.cpp wsd/Admin.hpp wsd/LOOLWSD.cpp

Jan Holesovsky kendy at collabora.com
Wed Feb 8 20:44:34 UTC 2017


 kit/ChildSession.hpp |    1 -
 kit/ForKit.cpp       |    2 ++
 kit/Kit.cpp          |    3 ++-
 wsd/Admin.cpp        |    6 +++---
 wsd/Admin.hpp        |    2 +-
 wsd/LOOLWSD.cpp      |    2 ++
 6 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit ad20adce1a245de76fc6124fb049344049f102ec
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Wed Feb 8 21:39:55 2017 +0100

    fuzzer: Don't handle signals when fuzzing.
    
    Change-Id: I2febdf96bcbbd5c6edaf791d99a77674e6f0b0a9

diff --git a/kit/ChildSession.hpp b/kit/ChildSession.hpp
index 3eabc74..da609b5 100644
--- a/kit/ChildSession.hpp
+++ b/kit/ChildSession.hpp
@@ -16,7 +16,6 @@
 #define LOK_USE_UNSTABLE_API
 #include <LibreOfficeKit/LibreOfficeKit.hxx>
 
-#include <Poco/NotificationQueue.h>
 #include <Poco/Thread.h>
 
 #include "Common.hpp"
diff --git a/kit/ForKit.cpp b/kit/ForKit.cpp
index 837812c..6362940 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 79e6f55..ae56b6e 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -40,7 +40,6 @@
 #include <Poco/Net/HTTPResponse.h>
 #include <Poco/Net/NetException.h>
 #include <Poco/Net/Socket.h>
-#include <Poco/NotificationQueue.h>
 #include <Poco/Process.h>
 #include <Poco/Runnable.h>
 #include <Poco/StringTokenizer.h>
@@ -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 9411255..24255df 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2314,8 +2314,10 @@ std::mutex Connection::Mutex;
 
 int LOOLWSD::main(const std::vector<std::string>& /*args*/)
 {
+#ifndef FUZZER
     SigUtil::setFatalSignals();
     SigUtil::setTerminationSignals();
+#endif
 
     // down-pay all the forkit linking cost once & early.
     Environment::set("LD_BIND_NOW", "1");
commit cb3ccfe32d997373edb6fe2f8d266e100405b2d8
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Wed Feb 8 21:39:10 2017 +0100

    Fix crash on exit in the Admin console.
    
    Change-Id: I5f90a12eb95f59d2b52a52e59526488b94975387

diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp
index d5b2277..68b511f 100644
--- a/wsd/Admin.cpp
+++ b/wsd/Admin.cpp
@@ -294,8 +294,8 @@ Admin::Admin() :
     LOG_TRC("Total memory used: " << totalMem);
     _model.addMemStats(totalMem);
 
-    _memStatsTask.reset(new MemoryStatsTask(this));
-    _memStatsTimer.schedule(_memStatsTask.get(), _memStatsTaskInterval, _memStatsTaskInterval);
+    _memStatsTask = new MemoryStatsTask(this);
+    _memStatsTimer.schedule(_memStatsTask, _memStatsTaskInterval, _memStatsTaskInterval);
 
     _cpuStatsTask = new CpuStats(this);
     _cpuStatsTimer.schedule(_cpuStatsTask, _cpuStatsTaskInterval, _cpuStatsTaskInterval);
@@ -353,7 +353,7 @@ void Admin::rescheduleMemTimer(unsigned interval)
 {
     _memStatsTask->cancel();
     _memStatsTaskInterval = interval;
-    _memStatsTask.reset(new MemoryStatsTask(this));
+    _memStatsTask = new MemoryStatsTask(this);
     _memStatsTimer.schedule(_memStatsTask.get(), _memStatsTaskInterval, _memStatsTaskInterval);
     LOG_INF("Memory stats interval changed - New interval: " << interval);
 }
diff --git a/wsd/Admin.hpp b/wsd/Admin.hpp
index 33f0617..f1cbe86 100644
--- a/wsd/Admin.hpp
+++ b/wsd/Admin.hpp
@@ -108,7 +108,7 @@ private:
     int _forKitPid;
 
     Poco::Util::Timer _memStatsTimer;
-    std::unique_ptr<MemoryStatsTask> _memStatsTask;
+    Poco::AutoPtr<MemoryStatsTask> _memStatsTask;
     unsigned _memStatsTaskInterval = 5000;
 
     Poco::Util::Timer _cpuStatsTimer;


More information about the Libreoffice-commits mailing list