SHA256
10
0
forked from pool/netgen
Files
netgen/0001-Disable-backtrace-generation.patch
Atri Bhattacharya 7171ae0433 Accepting request 1228737 from home:StefanBruens:branches:science
- update to version 6.2.2404
  * no changelog provided
- Rebase:
  * 0001-Include-filesystem-from-experimental-for-GCC-7.patch
  * 0001-Disable-backtrace-generation.patch
- Add:
  * 0001-Fix-ODR-violation-for-struct-class-Line.patch
  * 0002-Add-missing-includes-for-std-string-std-cerr-fix-nam.patch

OBS-URL: https://build.opensuse.org/request/show/1228737
OBS-URL: https://build.opensuse.org/package/show/science/netgen?expand=0&rev=41
2024-12-07 10:28:17 +00:00

42 lines
1.2 KiB
Diff

From 1934071e77efc2ab471c330afda2fe0dece074f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Mon, 1 Mar 2021 19:18:22 +0100
Subject: [PATCH] Disable backtrace generation
The backtracing functionality is quite fragile (depends on parsing output
from "nm" and "addr2line", calls signal unsafe functions in signal
handlers).
Also, linking fails due to missing linkage to libdl (uses dladdr).
---
libsrc/core/exception.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libsrc/core/exception.cpp b/libsrc/core/exception.cpp
index b89d721e..335e3411 100644
--- a/libsrc/core/exception.cpp
+++ b/libsrc/core/exception.cpp
@@ -23,7 +23,7 @@ namespace ngcore
// ********* STUFF FOR GETBACKTRACE ***************************
-#if defined __GNUC__ && !defined __EMSCRIPTEN__
+#if 0
#include <execinfo.h>
#include <string.h>
@@ -232,6 +232,10 @@ namespace ngcore
{
std::string GetBackTrace()
{
+ static auto backtrace = getenv("NG_BACKTRACE");
+ if(backtrace) {
+ return std::string("Backtrace disabled, use a debugger");
+ }
return std::string();
}
} // namespace ngcore
--
2.36.1