diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-09-10 13:55:07 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-09-10 13:55:07 (GMT) |
commit | c60542b12bdf11487b959bbb304f4ea194be6a19 (patch) | |
tree | 8348fc4667e247b4f382dfc263dcb9b8f559c1f0 /Python/pystrcmp.c | |
parent | ff0ed3e71cb828103cf21442231686f1b348479b (diff) | |
download | cpython-c60542b12bdf11487b959bbb304f4ea194be6a19.zip cpython-c60542b12bdf11487b959bbb304f4ea194be6a19.tar.gz cpython-c60542b12bdf11487b959bbb304f4ea194be6a19.tar.bz2 |
pytime: add _PyTime_check_mul_overflow() macro to avoid undefined behaviour
Overflow test in test_FromSecondsObject() fails on FreeBSD 10.0 buildbot which
uses clang. clang implements more aggressive optimization which gives
different result than GCC on undefined behaviours.
Check if a multiplication will overflow, instead of checking if a
multiplicatin had overflowed, to avoid undefined behaviour.
Add also debug information if the test on overflow fails.
Diffstat (limited to 'Python/pystrcmp.c')
0 files changed, 0 insertions, 0 deletions