mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-11 21:20:39 +02:00
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:
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user