mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 05:32:22 +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>
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include <util/byte_units.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