GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||
GeezerVison is showing github.com — bpo-42034:Fixed unchecked return in Objects/typeobject.c by monocle-ai · Pull Request #22695 · python/cpython 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! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Isn't the point that this is the function clean-up code? It wants to be run in full whether or not everything succeeds. By returning early you leak |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes, you are right. The function of the cleanup code is to run everything be it a success or a failure. But what happens when cls remains uninitialized after the function call PyArg_UnpackTuple on Line 826 and soon after that the code tries to access cls and use it's attribute tp_mro on Line 831 (if (cls->tp_mro == new_mro))? The code would then throw an exception and code to clean up temp would not be called and this exception would then be passed up the function call till it is handled gracefully. But you are right in pointing out that if we return based on the function failure, the code to clean up temp Py_DECREF(temp) will never be called. So, now I will only call the temp cleanup no matter what and instead of returning in case of failure, the code will now execute if block only in case of success. I believe this should solve both problems. As for the bail section, it is called before a call is made to the undo section (Line 794). So any change to the undo section would not have any impact on the bail section. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Removed return to call cleanup on temp in all the cases
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing this stale PR because the CLA is still not signed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.