-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-38879: Reordered error checking in PyArena_New(). #16587
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). Recognized GitHub usernameWe couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames: This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Hello @Zotyamester, please open an issue on the bug tracker for your suggestion. Thank you! |
@Zotyamester, I'm closing this for now. If you are interested in creating a ticket on the bug tracker, then this can be re-opened at that time. Thank you. |
@csabella Sorry but I don't understand your problem. I opened an issue on the bugtracker when you told me. What is the problem? |
@Zotyamester, sorry for that - I didn't see the bpo number. I've updated the PR title to reflect the ticket number and I've reopened the PR. Thank you! |
I don't think I understand the point of this change. This is saving one CPU instruction (perhaps one nanosecond) in the unlikely case of a memory error. @vstinner What do you think? |
@pitrou |
Sorry, I'm going to refuse this change. This is useless churn, and may complicate maintenance when backporting bugfixes. More constructive changes are still welcome, of course. |
Put "arena->a_cur = arena->a_head;" after the error checking of "arena->a_objects = PyList_New(0);". It's more optimal, even if it can't be measured.
https://bugs.python.org/issue38879
https://bugs.python.org/issue38879