summaryrefslogtreecommitdiffstats
path: root/Python/pystrcmp.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-09-10 13:55:07 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-09-10 13:55:07 (GMT)
commitc60542b12bdf11487b959bbb304f4ea194be6a19 (patch)
tree8348fc4667e247b4f382dfc263dcb9b8f559c1f0 /Python/pystrcmp.c
parentff0ed3e71cb828103cf21442231686f1b348479b (diff)
downloadcpython-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