diff --git a/catch1-sigstksz.patch b/catch1-sigstksz.patch new file mode 100644 index 0000000..dbd8941 --- /dev/null +++ b/catch1-sigstksz.patch @@ -0,0 +1,68 @@ +commit 34650cd9ea2f7e4aa1e61b84ecf9913b87870680 +Author: Tom Hughes +Date: Fri Feb 19 10:45:49 2021 +0000 + + Patch for non-constant SIGSTKSZ + +diff --git a/include/internal/catch_fatal_condition.hpp b/include/internal/catch_fatal_condition.hpp +index 1dcd545d..f7d9e10d 100644 +--- a/include/internal/catch_fatal_condition.hpp ++++ b/include/internal/catch_fatal_condition.hpp +@@ -136,7 +136,7 @@ namespace Catch { + static bool isSet; + static struct sigaction oldSigActions [sizeof(signalDefs)/sizeof(SignalDefs)]; + static stack_t oldSigStack; +- static char altStackMem[SIGSTKSZ]; ++ static char altStackMem[32768]; + + static void handleSignal( int sig ) { + std::string name = ""; +@@ -156,7 +156,7 @@ namespace Catch { + isSet = true; + stack_t sigStack; + sigStack.ss_sp = altStackMem; +- sigStack.ss_size = SIGSTKSZ; ++ sigStack.ss_size = 32768; + sigStack.ss_flags = 0; + sigaltstack(&sigStack, &oldSigStack); + struct sigaction sa = { 0 }; +@@ -188,7 +188,7 @@ namespace Catch { + bool FatalConditionHandler::isSet = false; + struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {}; + stack_t FatalConditionHandler::oldSigStack = {}; +- char FatalConditionHandler::altStackMem[SIGSTKSZ] = {}; ++ char FatalConditionHandler::altStackMem[32768] = {}; + + + } // namespace Catch +diff --git a/single_include/catch.hpp b/single_include/catch.hpp +index fdb046fe..d64fd1a5 100644 +--- a/single_include/catch.hpp ++++ b/single_include/catch.hpp +@@ -6540,7 +6540,7 @@ namespace Catch { + static bool isSet; + static struct sigaction oldSigActions [sizeof(signalDefs)/sizeof(SignalDefs)]; + static stack_t oldSigStack; +- static char altStackMem[SIGSTKSZ]; ++ static char altStackMem[32768]; + + static void handleSignal( int sig ) { + std::string name = ""; +@@ -6560,7 +6560,7 @@ namespace Catch { + isSet = true; + stack_t sigStack; + sigStack.ss_sp = altStackMem; +- sigStack.ss_size = SIGSTKSZ; ++ sigStack.ss_size = 32768; + sigStack.ss_flags = 0; + sigaltstack(&sigStack, &oldSigStack); + struct sigaction sa = { 0 }; +@@ -6591,7 +6591,7 @@ namespace Catch { + bool FatalConditionHandler::isSet = false; + struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {}; + stack_t FatalConditionHandler::oldSigStack = {}; +- char FatalConditionHandler::altStackMem[SIGSTKSZ] = {}; ++ char FatalConditionHandler::altStackMem[32768] = {}; + + } // namespace Catch + diff --git a/catch1.spec b/catch1.spec index 9a78415..55d59e5 100644 --- a/catch1.spec +++ b/catch1.spec @@ -2,12 +2,14 @@ Name: catch1 Version: 1.12.2 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A modern, C++-native, header-only, framework for unit-tests, TDD and BDD License: Boost -URL: https://github.com/philsquared/Catch -Source0: https://github.com/philsquared/Catch/archive/v%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/catchorg/Catch2 +Source0: https://github.com/catchorg/Catch2/archive/v%{version}/%{name}-%{version}.tar.gz +# https://github.com/catchorg/Catch2/issues/2178 +Patch0: catch1-sigstksz.patch BuildRequires: cmake make gcc-c++ @@ -55,6 +57,9 @@ cp -pr include %{buildroot}%{_includedir}/catch %changelog +* Fri Feb 19 2021 Tom Hughes - 1.12.2-8 +- Add patch for non-constant SIGSTKSZ + * Tue Jan 26 2021 Fedora Release Engineering - 1.12.2-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild