Skip to content

Commit

Permalink
Catch update: MINSIGSTKSZ not longer const for glibc>2.33
Browse files Browse the repository at this point in the history
Chatch needs update.  Test suite won't compile because of issue related to:
catchorg/Catch2#2421

A quick fix taken from:
catchorg/Catch2#2480

This issue has been fixed in Catch v2.13.5:
https://github.com/catchorg/Catch2/blob/devel/docs/release-notes.md#2135
  • Loading branch information
marek-miller committed Apr 28, 2023
1 parent 23a0a08 commit f7a5527
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/catch/catch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10614,7 +10614,16 @@ namespace Catch {

// 32kb for the alternate stack seems to be sufficient. However, this value
// is experimentally determined, so that's not guaranteed.
static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;

#if defined(_SC_SIGSTKSZ_SOURCE) || defined(_GNU_SOURCE)
// on glibc > 2.33 this is no longer constant, see
// https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=85e84fe53699fe9e392edffa993612ce08b2954a;hb=HEAD
static constexpr std::size_t sigStackSize = 32768;
#else
static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
#endif



static SignalDefs signalDefs[] = {
{ SIGINT, "SIGINT - Terminal interrupt signal" },
Expand Down

0 comments on commit f7a5527

Please sign in to comment.