-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
bpo-42422: Add new crasher to cover multiple versions of python interpreter #23448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Lib/test/crashers/null_code_obj.py
Outdated
| locals()['crash_37'] = crash_36 | ||
| locals()['crash_38'] = crash_38 | ||
| locals()['crash_39'] = crash_38 | ||
| locals()['crash_310'] = crash_38 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test suite only ever runs on the current version of python. I think you can restrict this to just crash_38 code, since at best this would be backported to 3.8 and 3.9.
2.7 is no longer maintained, so that can definitely be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ericvsmith for your suggestions. I have removed the 2.7 part and keep only the crash_38 for master 🤝
Lib/test/crashers/null_code_obj.py
Outdated
|
|
||
| py_ver = "".join(platform.python_version_tuple()[0:2]) | ||
| crash_func = "crash_{}".format(py_ver) | ||
| locals()[crash_func]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should remove all of the tests for the version number, and just call the code directly here. It just needs to be a one liner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, it's done as expected 🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, are we good for merging it now? Let me know if anything else is needed 🤝
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a discussion on the bug tracker issue discussing whether this crasher is needed, given what's already present.
|
This PR is stale because it has been open for 30 days with no activity. |
|
I'm not sure of the purpose of Lib/test/crashers/null_code_obj.py : Python is not going to get a bytecode verifier soon https://bugs.python.org/issue42422 It's a known fact that you can easily crash Python by executing malicious bytecode. |
|
Tests crashers were updated in the PR#23939 after my submission. I'm closing it. |
https://bugs.python.org/issue42422