If -fstack-protector-all
(part of default hardening flags) is used with the mingw-w64 compiler that is part of Ubuntu 16.04, the tests crash with:
00000000000ac1200 <boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&)>:
100000000007cdbd0 <boost::execution_monitor::execute(boost::function<int ()> const&)>:
200000000007ce1e0 <boost::execution_monitor::vexecute(boost::function<void ()> const&)>:
300000000007ba280 <boost::unit_test::unit_test_main(boost::unit_test::test_suite* (*)(int, char**), int, char**)>:
400000000004011b0 <__tmainCRTStartup>:
50000000000401514 <.l_start>:
This is before even reaching our code! Also bitcoin-qt crashes at startup if the wallet is enabled. This problem is reproducible both on Windows as on Wine.
The depends system was used to build the dependencies.
There is no such issue with Trusty’s compiler, as used for Travis and the current gitian builds, I don’t know if this is a compiler bug or a bug in how we use the compiler.
Bare -fstack-protector
does not appear to trigger this issue.
Was initially discussed in #8653.