summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Weimer <bernd.weimer@pelagicore.com>2020-03-17 08:55:42 +0100
committerBernd Weimer <bernd.weimer@pelagicore.com>2020-03-20 00:28:02 +0100
commitf02cbab80c0ca0a21c7dc91bddf0b6a2430e2c8c (patch)
tree28aad43087785ed1557e927b19141f0cb3525b76
parente2fc7241a2e684d90c01229cf3767420a149ebfe (diff)
Increase signal stack size
The crash info sometimes didn't inclulde the QML backtrace, because the signal stack was too small. This was probably hidden in the past by two additional, but redundant stack allocations. Also cleaned-up some code. Change-Id: I4173a1687ae7f2548d2609b4a26074766dfd211d Reviewed-by: Robert Griebl <robert.griebl@qt.io>
-rw-r--r--src/common-lib/unixsignalhandler.cpp6
-rw-r--r--src/manager-lib/nativeruntime.cpp1
-rw-r--r--src/manager-lib/nativeruntime.h3
-rw-r--r--src/tools/launcher-qml/launcher-qml.cpp4
-rw-r--r--src/tools/launcher-qml/launcher-qml_p.h4
5 files changed, 8 insertions, 10 deletions
diff --git a/src/common-lib/unixsignalhandler.cpp b/src/common-lib/unixsignalhandler.cpp
index c208412b..dc1f8747 100644
--- a/src/common-lib/unixsignalhandler.cpp
+++ b/src/common-lib/unixsignalhandler.cpp
@@ -76,10 +76,12 @@ UnixSignalHandler::UnixSignalHandler()
, m_pipe { -1, -1 }
{
// Setup alternate signal stack (to get backtrace for stack overflow)
+ // Canonical size might not be suffcient to get QML backtrace, so we double it
+ constexpr size_t stackSize = SIGSTKSZ * 2;
stack_t sigstack;
// valgrind will report this as leaked: nothing we can do about it
- sigstack.ss_sp = malloc_valgrind_ignore(SIGSTKSZ);
- sigstack.ss_size = SIGSTKSZ;
+ sigstack.ss_sp = malloc_valgrind_ignore(stackSize);
+ sigstack.ss_size = stackSize;
sigstack.ss_flags = 0;
sigaltstack(&sigstack, nullptr);
}
diff --git a/src/manager-lib/nativeruntime.cpp b/src/manager-lib/nativeruntime.cpp
index 5444cb53..be3879b6 100644
--- a/src/manager-lib/nativeruntime.cpp
+++ b/src/manager-lib/nativeruntime.cpp
@@ -59,7 +59,6 @@
#include "qtyaml.h"
#include "applicationinterface.h"
#include "applicationipcmanager.h"
-#include "applicationipcinterface.h"
#include "utilities.h"
#include "notificationmanager.h"
#include "dbus-utilities.h"
diff --git a/src/manager-lib/nativeruntime.h b/src/manager-lib/nativeruntime.h
index 1343402c..1945ed28 100644
--- a/src/manager-lib/nativeruntime.h
+++ b/src/manager-lib/nativeruntime.h
@@ -60,8 +60,6 @@ class Notification;
class NativeRuntime;
class NativeRuntimeInterface;
class NativeRuntimeApplicationInterface;
-class ApplicationIPCInterface;
-
class NativeRuntimeManager : public AbstractRuntimeManager
{
Q_OBJECT
@@ -128,7 +126,6 @@ private:
bool m_dbusConnection = false;
QString m_dbusConnectionName;
- QList<ApplicationIPCInterface *> m_applicationIPCInterfaces;
NativeRuntimeApplicationInterface *m_applicationInterface = nullptr;
NativeRuntimeInterface *m_runtimeInterface = nullptr;
AbstractContainerProcess *m_process = nullptr;
diff --git a/src/tools/launcher-qml/launcher-qml.cpp b/src/tools/launcher-qml/launcher-qml.cpp
index 6cb16ad8..0e533e10 100644
--- a/src/tools/launcher-qml/launcher-qml.cpp
+++ b/src/tools/launcher-qml/launcher-qml.cpp
@@ -196,8 +196,8 @@ int main(int argc, char *argv[])
}
}
-Controller::Controller(LauncherMain *a, bool quickLaunched)
- : Controller(a, quickLaunched, qMakePair(QString{}, QString{}))
+Controller::Controller(LauncherMain *launcher, bool quickLaunched)
+ : Controller(launcher, quickLaunched, qMakePair(QString{}, QString{}))
{ }
Controller::Controller(LauncherMain *launcher, bool quickLaunched, const QPair<QString, QString> &directLoad)
diff --git a/src/tools/launcher-qml/launcher-qml_p.h b/src/tools/launcher-qml/launcher-qml_p.h
index 10bed12a..67893f91 100644
--- a/src/tools/launcher-qml/launcher-qml_p.h
+++ b/src/tools/launcher-qml/launcher-qml_p.h
@@ -75,8 +75,8 @@ class Controller : public QObject
Q_OBJECT
public:
- Controller(LauncherMain *a, bool quickLaunched);
- Controller(LauncherMain *a, bool quickLaunched, const QPair<QString, QString> &directLoad);
+ Controller(LauncherMain *launcher, bool quickLaunched);
+ Controller(LauncherMain *launcher, bool quickLaunched, const QPair<QString, QString> &directLoad);
public slots:
void startApplication(const QString &baseDir, const QString &qmlFile, const QString &document,