aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2018-10-11 09:14:51 +0200
committerKai Koehne <kai.koehne@qt.io>2018-10-11 08:32:16 +0000
commit7ca32bc41c2b5a5f6ea360391ba7e398ad7f961b (patch)
treee01ee04fbcf40d739fd5fbb467fe5cb468d31f04 /tools
parent453a3806a31b29e8d57664359395ff1a59fdd49e (diff)
qmlplugindump: Remove sigsegv handler
It's not safe to use printf and memory allocations in a signal handler. Task-number: QTBUG-70460 Change-Id: I2a4caf302e17992471575bd89faa505a8db4a7e3 Reviewed-by: Marco Benelli <marco.benelli@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlplugindump/main.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index 5c5a6a8eb1..08fc0168dd 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -66,9 +66,6 @@
#include <QtGui/private/qsimulatorconnection_p.h>
#endif
-#ifdef Q_OS_UNIX
-#include <signal.h>
-#endif
#ifdef Q_OS_WIN
# if !defined(Q_CC_MINGW)
# include <crtdbg.h>
@@ -731,17 +728,6 @@ enum ExitCode {
EXIT_IMPORTERROR = 3
};
-#ifdef Q_OS_UNIX
-void sigSegvHandler(int) {
- fprintf(stderr, "Error: SEGV\n");
- if (!currentProperty.isEmpty())
- fprintf(stderr, "While processing the property '%s', which probably has uninitialized data.\n", currentProperty.toLatin1().constData());
- if (!inObjectInstantiation.isEmpty())
- fprintf(stderr, "While instantiating the object '%s'.\n", inObjectInstantiation.toLatin1().constData());
- exit(EXIT_SEGV);
-}
-#endif
-
void printUsage(const QString &appName)
{
std::cerr << qPrintable(QString(
@@ -964,17 +950,6 @@ int main(int argc, char *argv[])
#endif // Q_OS_WIN && !Q_CC_MINGW
// The default message handler might not print to console on some systems. Enforce this.
qInstallMessageHandler(printDebugMessage);
-#ifdef Q_OS_UNIX
- // qmldump may crash, but we don't want any crash handlers to pop up
- // therefore we intercept the segfault and just exit() ourselves
- struct sigaction sigAction;
-
- sigemptyset(&sigAction.sa_mask);
- sigAction.sa_handler = &sigSegvHandler;
- sigAction.sa_flags = 0;
-
- sigaction(SIGSEGV, &sigAction, nullptr);
-#endif
#ifdef QT_SIMULATOR
// Running this application would bring up the Qt Simulator (since it links Qt GUI), avoid that!