[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2021-12-06 Thread STINNER Victor
STINNER Victor added the comment: > I think PR https://github.com/python/cpython/pull/28674 has resolved this > issue. You're right. _threadmodule.c now uses _PyDeadline_Init() which calls _PyTime_Add(), and _PyTime_Add() prevents integer overflows; Extract of its implementation: //

[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2021-12-05 Thread hongweipeng
hongweipeng added the comment: I think PR https://github.com/python/cpython/pull/28674 has resolved this issue. -- nosy: +hongweipeng ___ Python tracker ___

[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2019-04-15 Thread Paul Ganssle
Paul Ganssle added the comment: > In short, a+b can overflow, but a-b cannot? I think it's more that by always checking the elapsed time against `now() - starttime`, you never need to represent the time at which the timeout should happen - which may be so far in the future that it causes a

[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2019-04-15 Thread STINNER Victor
STINNER Victor added the comment: In short, a+b can overflow, but a-b cannot? -- ___ Python tracker ___ ___ Python-bugs-list

[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2019-04-14 Thread Martin Panter
Martin Panter 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 for my setup at the time. I

[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2019-04-08 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2019-04-08 Thread Zackery Spytz
Zackery Spytz added the comment: I've created a PR based on Martin Panter's patch. -- components: +Extension Modules -Library (Lib) nosy: +ZackerySpytz versions: -Python 3.6 ___ Python tracker

[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2019-04-08 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +12652 stage: -> patch review ___ Python tracker ___ ___

[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2018-05-24 Thread STINNER Victor
STINNER Victor added the comment: > Modules/_threadmodule.c:52:47: runtime error: signed integer overflow: > 2387971499048 + 92233720360 cannot be represented in type 'long' How do you reproduce the issue? The thread module should limit the maximum timeout to

[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2018-05-24 Thread Martin Panter
Martin Panter added the comment: Looks like this is what my thread.patch was fixing in . You’re welcome to use my patch, but I won’t have time to work on it myself. -- nosy: +martin.panter

[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2018-05-24 Thread Antoine Pitrou
New submission from Antoine Pitrou : Modules/_threadmodule.c:52:47: runtime error: signed integer overflow: 2387971499048 + 92233720360 cannot be represented in type 'long' -- components: Library (Lib) messages: 317545 nosy: pitrou priority: normal severity: