HomePhabricator

Add -ftrapv to DEBUG_CXXFLAGS when --enable-debug is used

Description

Add -ftrapv to DEBUG_CXXFLAGS when --enable-debug is used

Summary:

By generating a trap for signed overflow on addition, subtraction,
multiplication operations in the Travis testing we are more likely to
identify problematic code prior to merging it.

Backport of core PR12686
https://github.com/bitcoin/bitcoin/pull/12686/files

Test Plan:

mkdir build && cd build
../configure --enable-debug
make check

mkdir buildcmake && cd buildcmake
cmake -GNinja .. -DCMAKE_BUILD_TYPE=Debug
ninja check

./test/functional/test_runner.py

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D3803

Details

Committed
FabienAug 6 2019, 09:06
Pushed
FabienAug 6 2019, 09:06
Reviewer
Restricted Project
Differential Revision
D3803: Add -ftrapv to DEBUG_CXXFLAGS when --enable-debug is used
Parents
rABCb7e198b65478: [CMAKE] Use plural form when multiple arguments are expected
Branches
Unknown
Tags
Unknown

Event Timeline