bitcoin: `-fstack-protector-all` triggers crashes in mingw-w64 5.3.1
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:
0000000000ac1200 <boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&)>:
00000000007cdbd0 <boost::execution_monitor::execute(boost::function<int ()> const&)>:
00000000007ce1e0 <boost::execution_monitor::vexecute(boost::function<void ()> const&)>:
00000000007ba280 <boost::unit_test::unit_test_main(boost::unit_test::test_suite* (*)(int, char**), int, char**)>:
00000000004011b0 <__tmainCRTStartup>:
0000000000401514 <.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.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 18 (14 by maintainers)
Commits related to this issue
- Merge #11437: [Docs] Update Windows build instructions for using WSL and Ubuntu 17.04 696ce46 [Docs] Update Windows build instructions for using WSL and Ubuntu 17.04 (fanquake) 4f890ba Add new step t... — committed to bitcoin/bitcoin by laanwj 7 years ago
- Merge #11438: Updated Windows build doc for WSL/Xenial workaround 7383d77 Updated instructions for Windows 10 Fall Creators Update. (Aaron Clauson) e0fc4a7 Updated Windows build doc for WSL/Xenial wo... — committed to bitcoin/bitcoin by laanwj 7 years ago
- Merge #11437: [Docs] Update Windows build instructions for using WSL and Ubuntu 17.04 696ce46 [Docs] Update Windows build instructions for using WSL and Ubuntu 17.04 (fanquake) 4f890ba Add new step t... — committed to codablock/dash by laanwj 7 years ago
- Merge #11437: [Docs] Update Windows build instructions for using WSL and Ubuntu 17.04 696ce46 [Docs] Update Windows build instructions for using WSL and Ubuntu 17.04 (fanquake) 4f890ba Add new step t... — committed to PACGlobalOfficial/PAC by laanwj 7 years ago
I re-tested cross-depends build with the most recent Ubuntu at this time (17.04, Zesty):
std::mutex
. It looks like mingw-w64, as of 6.2.1, still has nostd::mutex
implementation for win32 threads.test_bitcoin.exe
runs successfully with default hardening settings, all tests passbitcoin-qt.exe
runs successfully, gets synchronizingSo good news: the problem I’ve reported here is gone with newest Ubuntu. I haven’t tried any other versions, but clearly 16.04 (and possible 16.10) was a dud in this regard.
We should update
build-windows.md
as such, and add the part about POSIX alternatives from #8653 (but not recommend--disable-hardening
!).