[issue37665] threading.TIMEOUT_MAX integer overflow on 32-bit builds with threading.Thread.join

2022-03-24 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> undefined behaviour: signed integer overflow in threadmodule.c

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37665] threading.TIMEOUT_MAX integer overflow on 32-bit builds with threading.Thread.join

2019-07-23 Thread Zackery Spytz


Zackery Spytz  added the comment:

See also bpo-33632.

--
nosy: +ZackerySpytz

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37665] threading.TIMEOUT_MAX integer overflow on 32-bit builds with threading.Thread.join

2019-07-23 Thread Arun Sharma


New submission from Arun Sharma :

threading's TIMEOUT_MAX constant causes overflows when used as the timeout for 
threading.Thread.join on a 32-bit platform, like a Raspberry PI running 
Raspbian (2019-07-10-raspbian-buster).

The underlying code uses sem_timedwait.  The timespec on this platform resolves 
seconds to a 32-bit integer, adding the current time to the timeout to get a 
deadline.


>>> import threading
>>> threading.TIMEOUT_MAX
9223372036.0


The deadline is larger than the int32 UNIX Epoch and results in an overflow.

Just changing the threading.TIMEOUT_MAX to be based on the time left until the 
UNIX Epoch would require changing the timeout over the duration of the program 
and would not be very viable as the Epoch gets closer.

--
files: timeout_max_32_bit.py
messages: 348358
nosy: Arun Sharma
priority: normal
severity: normal
status: open
title: threading.TIMEOUT_MAX integer overflow on 32-bit builds with 
threading.Thread.join
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file48501/timeout_max_32_bit.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com