Skip to content

-fstack-protector-all triggers crashes in mingw-w64 5.3.1 #8732

@laanwj

Description

@laanwj

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-protectordoes not appear to trigger this issue.

Was initially discussed in #8653.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions