forked from pool/slade
This commit is contained in:
parent
efdbda33eb
commit
e667f8f2e6
@ -0,0 +1,52 @@
|
||||
From 519a5a5f87527a344ab04efa0947d5d8e75294e5 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: Sun, 28 Jun 2020 12:38:40 +0200
|
||||
Subject: [PATCH] build: allow deactivating the crash handler at build time
|
||||
(#1166)
|
||||
|
||||
SLADE's own crash handler has two problems:
|
||||
|
||||
* it inhibits the generation of a proper crashdump
|
||||
|
||||
* it calls functions that not async-signal safe and/or re-entrant,
|
||||
such as malloc (by way of backtrace(3)), which can lead to a hang
|
||||
when the initial crash happened in malloc,
|
||||
|
||||
Fixes: #1166
|
||||
---
|
||||
COMPILE.md | 1 +
|
||||
src/Application/SLADEWxApp.cpp | 2 +-
|
||||
src/CMakeLists.txt | 4 ++++
|
||||
3 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Application/SLADEWxApp.cpp b/src/Application/SLADEWxApp.cpp
|
||||
index 375f62b8..d9196355 100644
|
||||
--- a/src/Application/SLADEWxApp.cpp
|
||||
+++ b/src/Application/SLADEWxApp.cpp
|
||||
@@ -523,7 +523,7 @@ bool SLADEWxApp::OnInit()
|
||||
#endif
|
||||
|
||||
// Handle exceptions using wxDebug stuff, but only in release mode
|
||||
-#ifdef NDEBUG
|
||||
+#if defined(USE_CRASHHANDLER) && defined(NDEBUG)
|
||||
wxHandleFatalExceptions(true);
|
||||
#endif
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 4ce2403d..5eabe4c7 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -132,6 +132,10 @@ if (NOT NO_FLUIDSYNTH)
|
||||
include_directories(${FLUIDSYNTH_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
+if (NOT NO_CRASHHANDLER)
|
||||
+ add_definitions(-DUSE_CRASHHANDLER)
|
||||
+endif ()
|
||||
+
|
||||
set(SLADE_SOURCES
|
||||
)
|
||||
# Don't include external libraries here as they should be compiled separately
|
||||
--
|
||||
2.27.0
|
||||
|
@ -1,7 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 28 10:44:36 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Add 0001-build-allow-deactivating-the-crash-handler-at-build-.patch
|
||||
Deactivate the crash handler, because it hangs. Let the kernel
|
||||
generate a standard dump instead.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 22 20:16:13 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Add lzma.diff to use system-provided clzma library.
|
||||
- Add clzma.diff to use system-provided clzma library.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 26 08:26:11 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
@ -29,6 +29,7 @@ Source100: slade.appdata.xml
|
||||
Patch1: basepk3.diff
|
||||
Patch2: wx.diff
|
||||
Patch3: clzma.diff
|
||||
Patch4: 0001-build-allow-deactivating-the-crash-handler-at-build-.patch
|
||||
Patch10: disable_sse.patch
|
||||
# slade 3.2 will need gcc-c++>=8 and pkgconfig(fmt)>=6
|
||||
BuildRequires: ImageMagick
|
||||
@ -58,14 +59,14 @@ from/to other generic formats such as PNG.
|
||||
|
||||
%prep
|
||||
%setup -q -n SLADE-%version
|
||||
%patch -P 1 -P 2 -P 3 -p1
|
||||
%patch -P 1 -P 2 -P 3 -P 4 -p1
|
||||
%ifnarch %ix86 x86_64
|
||||
%patch10 -p0
|
||||
%endif
|
||||
|
||||
%build
|
||||
%define _lto_cflags %nil
|
||||
%cmake -DNO_WEBVIEW=ON -DWX_GTK3=OFF \
|
||||
%cmake -DNO_WEBVIEW=ON -DWX_GTK3=OFF -DNO_CRASHHANDLER=ON \
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="%optflags" \
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="%optflags"
|
||||
make %{?_smp_mflags}
|
||||
|
Loading…
Reference in New Issue
Block a user