Martin Panter <vadmium...@gmail.com> added the comment:

Victor, if you run the test suite, one of the test cases should trigger the 
overflow. I used to compile with Undefined Behaviour Sanitizer to print 
messages when these errors occur; see 
<https://bugs.python.org/issue1621#msg271118> for my setup at the time. I 
presume Antoine did something similar.

I do not remember, but suspect the test case might be the following lines of 
“BaseLockTests.test_timeout” in Lib/test/lock_tests.py, testing a fraction of a 
second less than PY_TIMEOUT_MAX:

# TIMEOUT_MAX is ok
lock.acquire(timeout=TIMEOUT_MAX)

Perhaps reducing PY_TIMEOUT_MAX by a few centuries would be one way to avoid 
the problem. In my patch I avoided the problem by rearranging the arithmetic, 
so that the timeout value is only compared and reduced, never added.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33632>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to