msg304083 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2017-10-10 21:29 |
The following code causes an assertion error in timedelta constructor. from datetime import timedelta class BadInt(int): def __mul__(self, other): return Prod() class Prod: def __radd__(self, other): return Sum() class Sum: def __divmod__(self, other): return (0, -1) timedelta(hours=BadInt(1)) Result: python: /home/serhiy/py/cpython/Modules/_datetimemodule.c:1573: microseconds_to_delta_ex: Assertion `0 <= temp && temp < 1000000' failed. Aborted (core dumped) |
|
|
msg304131 - (view) |
Author: Louie Lu (louielu) * |
Date: 2017-10-11 13:22 |
I got a different result in latest commit: eeb5ffd54e5 ➜ cpython git:(master) ✗ ./python test.py Traceback (most recent call last): File "test.py", line 15, in timedelta(hours=BadInt(1)) SystemError: <class 'datetime.timedelta'> returned NULL without setting an error Do I miss some configure, I'm using ./configure --with-debug |
|
|
msg304351 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2017-10-13 19:32 |
On Win10, installed 3.5.4, 3.6.3, 3.7.1a1 all raise SystemError. 3.6 and 3.7 repository debug builds raise AssertionError and Windows crash box. After the patch, a silent crash. |
|
|
msg304751 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2017-10-22 14:27 |
Unpatched Python should crash in debug build and can raise SystemError in release build. I can't reproduce a crash on Windows after the patch. |
|
|
msg304808 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2017-10-23 14:12 |
New changeset 4ffd4653a7ec9c97775472276cf5e159e2366bb2 by Serhiy Storchaka in branch 'master': bpo-31752: Fix possible crash in timedelta constructor called with custom integers. (#3947) https://github.com/python/cpython/commit/4ffd4653a7ec9c97775472276cf5e159e2366bb2 |
|
|
msg304810 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2017-10-23 15:20 |
New changeset 6e45d7b90accbbdfef353c41ab0a78a3e4742803 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-31752: Fix possible crash in timedelta constructor called with custom integers. (GH-3947) (#4086) https://github.com/python/cpython/commit/6e45d7b90accbbdfef353c41ab0a78a3e4742803 |
|
|
msg304822 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2017-10-23 16:57 |
New changeset 5ef883b096895a84123760859f0f34ad37bf2277 by Serhiy Storchaka in branch '2.7': [2.7] bpo-31752: Fix possible crash in timedelta constructor called with custom integers. (GH-3947) (#4088) https://github.com/python/cpython/commit/5ef883b096895a84123760859f0f34ad37bf2277 |
|
|
msg327990 - (view) |
Author: Thomas Wouters (twouters) *  |
Date: 2018-10-18 17:37 |
This patch includes assertions that are easily triggered from user code: https://bugs.python.org/issue35021 |
|
|
msg330143 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2018-11-20 18:41 |
New changeset 3ec0f495163da3b7a15deb2805cec48aed432f58 by Serhiy Storchaka in branch 'master': bpo-35021: Fix assertion failures in _datetimemodule.c. (GH-10039) https://github.com/python/cpython/commit/3ec0f495163da3b7a15deb2805cec48aed432f58 |
|
|
msg330146 - (view) |
Author: miss-islington (miss-islington) |
Date: 2018-11-20 18:59 |
New changeset d57ab8ac182d15558118523ad1b11b029e105c46 by Miss Islington (bot) in branch '3.7': bpo-35021: Fix assertion failures in _datetimemodule.c. (GH-10039) https://github.com/python/cpython/commit/d57ab8ac182d15558118523ad1b11b029e105c46 |
|
|
msg330148 - (view) |
Author: miss-islington (miss-islington) |
Date: 2018-11-20 19:02 |
New changeset 7a0d964afb41bde846771c81ba746238339cdd8c by Miss Islington (bot) in branch '3.6': bpo-35021: Fix assertion failures in _datetimemodule.c. (GH-10039) https://github.com/python/cpython/commit/7a0d964afb41bde846771c81ba746238339cdd8c |
|
|
msg330151 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2018-11-20 19:56 |
New changeset 40fdf471931f029ea07e6190f0fe116e0735661b by Serhiy Storchaka in branch '2.7': [2.7] bpo-35021: Fix assertion failures in _datetimemodule.c. (GH-10039) (GH-10617) https://github.com/python/cpython/commit/40fdf471931f029ea07e6190f0fe116e0735661b |
|
|