Page MenuHomePhabricator

build with -fstack-reuse=none
ClosedPublic

Authored by Fabien on Wed, Jan 22, 10:57.

Details

Reviewers
deadalnix
jasonbcox
Group Reviewers
Restricted Project
Commits
rABC67ee725da5fb: build with -fstack-reuse=none
Summary

This will fix the crypto_tests failure on 32-bits platforms.

Backport of core PR15983:
https://github.com/bitcoin/bitcoin/pull/15983/files

With CMake the flag is set for C++ as well as C, while autotools only
has the C++ flag. This is on purpose as the bug is also affecting gcc
and not only g++. I ran the benchmarks and this caused no noticeable
runtime difference.

Fun fact: you can also get rid of the bug by disabling the optimizations
(i.e. build with debug enabled).

Test Plan
cmake -GNinja .. \
  -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Linux32.cmake \
  -DENABLE_STATIC_LIBSTDCXX=ON \
  -DENABLE_GLIBC_BACK_COMPAT=ON
ninja test_bitcoin
./src/test/test_bitcoin -t crypto_tests

Make sure the test is green. Note that this can't run on WSL because the
kernel only supports 64-bits binaries.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Wed, Jan 22, 10:57
Herald added a reviewer: Restricted Project. · View Herald TranscriptWed, Jan 22, 10:57
teamcity edited the summary of this revision. (Show Details)Wed, Jan 22, 10:57

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those Bitcoin Core PRs have been inserted into the summary for reference.

Blarg, compiler bugs, that is fun :D

jasonbcox accepted this revision.Wed, Jan 22, 16:40
This revision is now accepted and ready to land.Wed, Jan 22, 16:40
This revision was automatically updated to reflect the committed changes.