Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
cryptocurrency
immer
immer-sigstksz.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File immer-sigstksz.patch of Package immer
From da180754cc64dec42b6af58674906b2dee295aa3 Mon Sep 17 00:00:00 2001 From: Oleg Girko <ol@infoserver.lv> Date: Wed, 24 Aug 2022 23:43:59 +0300 Subject: [PATCH] Fix use of SIGSTKSZ in tests. The SIGSTKSZ macro may be not a constant in newer glibc. Hence, it can't be used as a size of static array. Signed-off-by: Oleg Girko <ol@infoserver.lv> --- tools/include/doctest.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/include/doctest.h b/tools/include/doctest.h index 695c271..623bdeb 100644 --- a/tools/include/doctest.h +++ b/tools/include/doctest.h @@ -4463,7 +4463,7 @@ namespace detail static bool isSet; static struct sigaction oldSigActions[sizeof(signalDefs) / sizeof(SignalDefs)]; static stack_t oldSigStack; - static char altStackMem[SIGSTKSZ]; + static char* altStackMem; static void handleSignal(int sig) { std::string name = "<unknown signal>"; @@ -4480,6 +4480,8 @@ namespace detail } FatalConditionHandler() { + if (altStackMem == nullptr) + altStackMem = new char[SIGSTKSZ]; isSet = true; stack_t sigStack; sigStack.ss_sp = altStackMem; @@ -4512,8 +4514,8 @@ namespace detail bool FatalConditionHandler::isSet = false; struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs) / sizeof(SignalDefs)] = {}; - stack_t FatalConditionHandler::oldSigStack = {}; - char FatalConditionHandler::altStackMem[SIGSTKSZ] = {}; + stack_t FatalConditionHandler::oldSigStack = {}; + char* FatalConditionHandler::altStackMem = nullptr; #endif // DOCTEST_PLATFORM_WINDOWS #endif // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH -- 2.37.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Contact
Support
@OBShq
The Open Build Service is an
openSUSE project
.
Log In
Places
Places
All Projects
Status Monitor