|
Boost Testing : |
From: Jeroen van der Wulp (J.v.d.Wulp_at_[hidden])
Date: 2008-07-13 11:33:04
Hello everyone,
The recent changes to Boost.test on trunk have caused testing failures
on OS X. The problem is that internally an exception is thrown on
destruction of every signal_handler. The result looks like this:
boost/boost/test/minimal.hpp(123): exception "system_error produced by:
::sigaltstack( &sigstk, 0 ) != -1: Cannot allocate memory" caught in
function: 'int main(int, char**)'
The cause seems to be that the implementation of sigaltstack() on
Leopard requires the ss_size of a stack_t structure to be MINSIGSTKSZ at
least.
The attached patch accomplishes just this.
Regards,
Jeroen van der Wulp
Index: 3rd-party/boost/boost/test/impl/execution_monitor.ipp
===================================================================
--- 3rd-party/boost/boost/test/impl/execution_monitor.ipp (revision 47301)
+++ 3rd-party/boost/boost/test/impl/execution_monitor.ipp (working copy)
@@ -669,6 +669,7 @@
#ifdef BOOST_TEST_USE_ALT_STACK
stack_t sigstk = {};
+ sigstk.ss_size = BOOST_TEST_ALT_STACK_SIZE;
sigstk.ss_flags = SS_DISABLE;
BOOST_TEST_SYS_ASSERT( ::sigaltstack( &sigstk, 0 ) != -1 );
#endif