test: avoid undersized Boost.Test signal stacks

Boost.Test registers a `SIGSTKSZ` alternate signal stack as each test binary starts, before any tests run.
On musl, this can be smaller than Linux's hardware-dependent minimum, causing `sigaltstack()` to fail with `ENOMEM` during setup.

Disable Boost.Test's alternate stack in both test entry points.
Signal handlers continue to use the regular process stack. Boost.Test can no longer report stack overflows.

Fixes #36026

Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>

Github-Pull: #36045
Rebased-From: 9eba3aafa6
This commit is contained in:
Lőrinc
2026-07-24 12:45:09 -07:00
committed by fanquake
parent c1f07f9161
commit d9f422136c
2 changed files with 4 additions and 0 deletions

View File

@@ -6,6 +6,8 @@
#include <kernel/bitcoinkernel_wrapper.h>
#include <util/fs.h>
// Boost.Test's SIGSTKSZ alternate stack can be smaller than Linux requires on musl.
#define BOOST_TEST_DISABLE_ALT_STACK
#define BOOST_TEST_MODULE Bitcoin Kernel Test Suite
#include <boost/test/included/unit_test.hpp>

View File

@@ -5,6 +5,8 @@
/**
* See https://www.boost.org/doc/libs/1_78_0/libs/test/doc/html/boost_test/adv_scenarios/single_header_customizations/multiple_translation_units.html
*/
// Boost.Test's SIGSTKSZ alternate stack can be smaller than Linux requires on musl.
#define BOOST_TEST_DISABLE_ALT_STACK
#define BOOST_TEST_MODULE Bitcoin Core Test Suite
#include <boost/test/included/unit_test.hpp>