Page MenuHomePhabricator

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

Authored by Fabien on Mon, Aug 5, 16:11.

Details

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

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.