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