Descriptionbreakpad: fix unittest failure when building with clang.
In C/C++, the result of signed integer overflow is undefined.
The expression "base + size - 1" is parsed as "(base + size) - 1", and
"base + size" can overflow even if "base + (size - 1)" <= INT_MAX.
See http://g/c-compiler-chrome/461JohPKakE/JI3rEBg6FwAJ for more.
BUG=None
TEST='CC=clang CXX=clang++ ./configure && make check'
R=vapier@chromium.org
Committed: https://chromium.googlesource.com/breakpad/breakpad/+/fc134c412a724052188913de6eac99537eb97116
Patch Set 1 #
Messages
Total messages: 5 (2 generated)
|