This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Undefined behavior in Python/hamt.c
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: BTaskaya, ZackerySpytz, benjamin.peterson, mangrisano, miss-islington, yselivanov
Priority: normal Keywords: patch

Created on 2019-06-29 00:58 by ZackerySpytz, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 17727 merged BTaskaya, 2019-12-28 09:10
PR 17767 merged miss-islington, 2019-12-31 02:32
Messages (5)
msg346876 - (view) Author: Zackery Spytz (ZackerySpytz) * (Python triager) Date: 2019-06-29 00:58
./python -m unittest test.test_context.HamtTest.test_hamt_stress
Python/hamt.c:1867:29: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
.
----------------------------------------------------------------------
Ran 1 test in 12.702s

OK
msg346885 - (view) Author: Michele Angrisano (mangrisano) * Date: 2019-06-29 15:33
I don't get that output on 3.8.0a4+. I'm on OSX.
Anyway, I think that 1 should be cast with unsigned.

What do you think?
msg358935 - (view) Author: Batuhan Taskaya (BTaskaya) * (Python committer) Date: 2019-12-28 09:11
> I don't get that output on 3.8.0a4+

I guess it is related with you didn't added -fsanitize=undefined option.
msg359092 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2019-12-31 02:31
New changeset d0c92e81aa2171228a23cb2bed36f7dab975257d by Benjamin Peterson (Batuhan Taşkaya) in branch 'master':
closes bpo-37446: resolve undefined behavior in Python/hamt.c (GH-17727)
https://github.com/python/cpython/commit/d0c92e81aa2171228a23cb2bed36f7dab975257d
msg359093 - (view) Author: miss-islington (miss-islington) Date: 2019-12-31 02:51
New changeset a278ae19b4daa1deb11e2a8eed38838027e90ece by Miss Islington (bot) in branch '3.8':
closes bpo-37446: resolve undefined behavior in Python/hamt.c (GH-17727)
https://github.com/python/cpython/commit/a278ae19b4daa1deb11e2a8eed38838027e90ece
History
Date User Action Args
2022-04-11 14:59:17adminsetgithub: 81627
2019-12-31 02:51:25miss-islingtonsetnosy: + miss-islington
messages: + msg359093
2019-12-31 02:32:05miss-islingtonsetpull_requests: + pull_request17203
2019-12-31 02:31:58benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg359092

resolution: fixed
stage: patch review -> resolved
2019-12-28 09:11:04BTaskayasetnosy: + BTaskaya
messages: + msg358935
2019-12-28 09:10:19BTaskayasetkeywords: + patch
stage: patch review
pull_requests: + pull_request17171
2019-06-29 15:33:54mangrisanosetnosy: + mangrisano
messages: + msg346885
2019-06-29 00:58:10ZackerySpytzcreate