[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - 2 commits - wsd/LOOLWSD.cpp wsd/LOOLWSD.hpp

Jan Holesovsky (via logerrit) logerrit at kemper.freedesktop.org
Sat Feb 29 11:22:23 UTC 2020


 wsd/LOOLWSD.cpp |    6 +++++-
 wsd/LOOLWSD.hpp |    4 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 1da7325d388b7c98d4fa0b6a924b580a5cc16752
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Feb 28 14:58:32 2020 +0100
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Sat Feb 29 11:08:57 2020 +0000

    Just try to catch everything in the getSafeConfig().
    
    Poco::Exception is derived from std::exception, yet there were cases
    where it was not caught - no idea why:
    
    I/DEBUG   (24700):     #00 pc 000371e4  /system/lib/libc.so (tgkill+12)
    I/DEBUG   (24700):     #01 pc 00013fb9  /system/lib/libc.so (pthread_kill+52)
    I/DEBUG   (24700):     #02 pc 00014bd7  /system/lib/libc.so (raise+10)
    I/DEBUG   (24700):     #03 pc 00011519  /system/lib/libc.so (__libc_android_abort+36)
    I/DEBUG   (24700):     #04 pc 0000fca4  /system/lib/libc.so (abort+4)
    I/DEBUG   (24700):     #05 pc 000126e9  /system/lib/libc.so (__libc_fatal+16)
    I/DEBUG   (24700):     #06 pc 0001159d  /system/lib/libc.so (__assert2+20)
    I/DEBUG   (24700):     #07 pc 00064fed  /data/app/com.collabora.libreoffice-1/lib/arm/libc++_shared.so
    I/DEBUG   (24700):     #08 pc 00065183  /data/app/com.collabora.libreoffice-1/lib/arm/libc++_shared.so
    I/DEBUG   (24700):     #09 pc 0006cb79  /data/app/com.collabora.libreoffice-1/lib/arm/libc++_shared.so
    I/DEBUG   (24700):     #10 pc 0006c527  /data/app/com.collabora.libreoffice-1/lib/arm/libc++_shared.so
    I/DEBUG   (24700):     #11 pc 0006c4ef  /data/app/com.collabora.libreoffice-1/lib/arm/libc++_shared.so (__cxa_throw+74)
    I/DEBUG   (24700):     #12 pc 001be25c  /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so (_ZNK4Poco4Util21AbstractConfiguration7getBoolERKNSt6__ndk112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE+208)
    I/DEBUG   (24700):     #13 pc 001847fd  /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so (_ZN7LOOLWSD17ConfigValueGetterclERb+12)
    I/DEBUG   (24700):     #14 pc 001847c3  /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so (_ZN7LOOLWSD13getSafeConfigIbEEbRN4Poco4Util20LayeredConfigurationERKNSt6__ndk112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERT_+22)
    I/DEBUG   (24700):     #15 pc 00184747  /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so (_ZN7LOOLWSD14getConfigValueIbEET_RN4Poco4Util20LayeredConfigurationERKNSt6__ndk112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEES1_+38)
    I/DEBUG   (24700):     #16 pc 0018748b  /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so (_ZN7LOOLWSD10initializeERN4Poco4Util11ApplicationE+1334)
    I/DEBUG   (24700):     #17 pc 001c7274  /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so (_ZN4Poco4Util11Application3runEv+28)
    I/DEBUG   (24700):     #18 pc 00134fbf  /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so
    I/DEBUG   (24700):     #19 pc 00134df7  /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so
    I/DEBUG   (24700):     #20 pc 00134dc5  /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so
    I/DEBUG   (24700):     #21 pc 000137a3  /system/lib/libc.so (_ZL15__pthread_startPv+30)
    I/DEBUG   (24700):     #22 pc 00011883  /system/lib/libc.so (__start_thread+6)
    
    Change-Id: Ica643f88d572b239b9a124e31cb4552f86439bf6
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89715
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp
index 204129d77..b4e2b4306 100644
--- a/wsd/LOOLWSD.hpp
+++ b/wsd/LOOLWSD.hpp
@@ -262,7 +262,7 @@ private:
             ConfigValueGetter(config, name)(value);
             return true;
         }
-        catch (const std::exception&)
+        catch (...)
         {
         }
 
commit e227c91b70abf7e1d3cd903b923643394abba3e8
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Feb 28 14:55:42 2020 +0100
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Sat Feb 29 11:08:50 2020 +0000

    android: Don't even try to read these values, seem to trigger an exception.
    
    All the code that is using them is compiled out on Android anyway.
    
    Change-Id: Ica349135202211ecdcb095bb82aa677f2dee19ba
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89714
    Tested-by: Michael Meeks <michael.meeks at collabora.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index f9fc062e2..b61119d35 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -213,7 +213,6 @@ static int careerSpanMs = 0;
 
 /// The timeout for a child to spawn, initially high, then reset to the default.
 int ChildSpawnTimeoutMs = CHILD_TIMEOUT_MS * 4;
-bool LOOLWSD::NoCapsForKit = false;
 std::atomic<unsigned> LOOLWSD::NumConnections;
 std::set<std::string> LOOLWSD::EditFileExtensions;
 
@@ -699,8 +698,11 @@ std::atomic<uint64_t> LOOLWSD::NextConnectionId(1);
 std::atomic<int> LOOLWSD::ForKitWritePipe(-1);
 std::atomic<int> LOOLWSD::ForKitProcId(-1);
 #endif
+#if !MOBILEAPP
+bool LOOLWSD::NoCapsForKit = false;
 bool LOOLWSD::NoSeccomp = false;
 bool LOOLWSD::AdminEnabled = true;
+#endif
 #ifdef FUZZER
 bool LOOLWSD::DummyLOK = false;
 std::string LOOLWSD::FuzzFileName;
@@ -1100,9 +1102,11 @@ void LOOLWSD::initialize(Application& self)
     LOOLWSD::MaxConnections = MAX_CONNECTIONS;
     LOOLWSD::MaxDocuments = MAX_DOCUMENTS;
 
+#if !MOBILEAPP
     NoSeccomp = !getConfigValue<bool>(conf, "security.seccomp", true);
     NoCapsForKit = !getConfigValue<bool>(conf, "security.capabilities", true);
     AdminEnabled = getConfigValue<bool>(conf, "admin_console.enable", true);
+#endif
 
 #if ENABLE_SUPPORT_KEY
     const std::string supportKeyString = getConfigValue<std::string>(conf, "support_key", "");
diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp
index d14b77ae5..204129d77 100644
--- a/wsd/LOOLWSD.hpp
+++ b/wsd/LOOLWSD.hpp
@@ -49,9 +49,11 @@ public:
     // so just keep these as statics.
     static std::atomic<uint64_t> NextConnectionId;
     static unsigned int NumPreSpawnedChildren;
+#if !MOBILEAPP
     static bool NoCapsForKit;
     static bool NoSeccomp;
     static bool AdminEnabled;
+#endif
     static std::atomic<int> ForKitWritePipe;
     static std::atomic<int> ForKitProcId;
     static bool DummyLOK;


More information about the Libreoffice-commits mailing list