classification
Title: Outdated CodeType call in "bogus_code_obj.py"
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Dennis Sweeney, miss-islington, serhiy.storchaka, xxm
Priority: normal Keywords: patch

Created on 2020-12-25 05:45 by xxm, last changed 2020-12-25 19:46 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 23939 merged serhiy.storchaka, 2020-12-25 11:27
PR 23940 merged miss-islington, 2020-12-25 15:03
PR 23941 merged miss-islington, 2020-12-25 15:04
Messages (8)
msg383721 - (view) Author: Xinmeng Xia (xxm) Date: 2020-12-25 05:45
In "Python/Lib/test/crashers/README", it said "This directory only contains tests for outstanding bugs that cause the
interpreter to segfault..... Once the crash is fixed, the test case should be moved into an appropriate test." 

The file "bogus_code_obj.py" has been fixed on Python 3.8, 3.9, 3.10. No segmentation fault will be caused any more. I think this file should be removed from "Python/Lib/test/crashers".
msg383735 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-12-25 11:10
No, it was not fixed. The code object creation was broken, because the code constructor signature was changed.
msg383737 - (view) Author: Xinmeng Xia (xxm) Date: 2020-12-25 11:45
Yes,you are right. I thought it was fixed,but it wasn't. Thanks.
msg383745 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-12-25 15:03
New changeset 954a7427ba9c2d02faed32c02090caeca873aeca by Serhiy Storchaka in branch 'master':
bpo-42734: Fix crasher bogus_code_obj.py (GH-23939)
https://github.com/python/cpython/commit/954a7427ba9c2d02faed32c02090caeca873aeca
msg383748 - (view) Author: miss-islington (miss-islington) Date: 2020-12-25 15:21
New changeset 0178a6b67ca3e782443f311e953509ca3eb4aacf by Miss Islington (bot) in branch '3.8':
bpo-42734: Fix crasher bogus_code_obj.py (GH-23939)
https://github.com/python/cpython/commit/0178a6b67ca3e782443f311e953509ca3eb4aacf
msg383749 - (view) Author: miss-islington (miss-islington) Date: 2020-12-25 15:23
New changeset 51f502914656a1f8e8ffdf6e1b06f670d8fea8ed by Miss Islington (bot) in branch '3.9':
bpo-42734: Fix crasher bogus_code_obj.py (GH-23939)
https://github.com/python/cpython/commit/51f502914656a1f8e8ffdf6e1b06f670d8fea8ed
msg383759 - (view) Author: Dennis Sweeney (Dennis Sweeney) * (Python triager) Date: 2020-12-25 19:14
To make it slightly more readable and future-proof so such things don't become outdated again in the future, you could use the CodeType.replace() method.

See also https://bugs.python.org/issue42422
msg383761 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-12-25 19:46
To be honest, I was not sure that replace() exists in 3.8 and I was too lazy to write different code for different versions. Next time when bogus_code_obj.py become outdated again we will use replace().
History
Date User Action Args
2020-12-25 19:46:13serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: + msg383761

stage: patch review -> resolved
2020-12-25 19:14:42Dennis Sweeneysetnosy: + Dennis Sweeney
messages: + msg383759
2020-12-25 15:23:20miss-islingtonsetmessages: + msg383749
2020-12-25 15:21:02miss-islingtonsetmessages: + msg383748
2020-12-25 15:04:09miss-islingtonsetpull_requests: + pull_request22791
2020-12-25 15:03:55miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request22790
2020-12-25 15:03:46serhiy.storchakasetmessages: + msg383745
2020-12-25 11:45:21xxmsettype: enhancement -> behavior
messages: + msg383737
2020-12-25 11:27:11serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request22789
2020-12-25 11:21:36serhiy.storchakasettitle: "bogus_code_obj.py" should be removed from "cPython/Lib/test/crashers" -> Outdated CodeType call in "bogus_code_obj.py"
2020-12-25 11:10:52serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg383735
2020-12-25 05:45:29xxmcreate