bpo-38631: Replace compiler fatal errors with exceptions#24369
Merged
vstinner merged 3 commits intopython:masterfrom Jan 30, 2021
vstinner:compiler_fatal
Merged
bpo-38631: Replace compiler fatal errors with exceptions#24369vstinner merged 3 commits intopython:masterfrom vstinner:compiler_fatal
vstinner merged 3 commits intopython:masterfrom
vstinner:compiler_fatal
Conversation
* Replace Py_FatalError() calls with regular SystemError exceptions. * compiler_exit_scope() calls _PyErr_WriteUnraisableMsg() to log the PySequence_DelItem() failure. * compiler_unit_check() uses _PyMem_IsPtrFreed() * compiler_make_closure(): remove "(reftype == FREE)" comment since reftype can also be LOCAL or GLOBAL_EXPLICIT.
Member
Author
|
cc @isidentical @lysnikolaou @pablogsal I injected bugs to check if the SystemError error message is formatted properly. Error 1: Error 2: Error 3: It seems like if |
isidentical
reviewed
Jan 29, 2021
pablogsal
reviewed
Jan 29, 2021
| arg = compiler_lookup_arg(c->u->u_cellvars, name); | ||
| else /* (reftype == FREE) */ | ||
| } | ||
| else { |
Member
There was a problem hiding this comment.
Please, preserve the comment for the else branch: /* (reftype == FREE) */
Member
Author
There was a problem hiding this comment.
Please, preserve the comment for the else branch: /* (reftype == FREE) */
See the commit message: the comment is wrong. Try to convert the comment into an assertion.
pablogsal
reviewed
Jan 29, 2021
pablogsal
reviewed
Jan 29, 2021
Co-authored-by: Pablo Galindo <[email protected]>
Co-authored-by: Pablo Galindo <[email protected]>
pablogsal
approved these changes
Jan 30, 2021
adorilson
pushed a commit
to adorilson/cpython
that referenced
this pull request
Mar 13, 2021
) * Replace Py_FatalError() calls with regular SystemError exceptions. * compiler_exit_scope() calls _PyErr_WriteUnraisableMsg() to log the PySequence_DelItem() failure. * compiler_unit_check() uses _PyMem_IsPtrFreed(). * compiler_make_closure(): remove "(reftype == FREE)" comment since reftype can also be LOCAL or GLOBAL_EXPLICIT.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PySequence_DelItem() failure.
reftype can also be LOCAL or GLOBAL_EXPLICIT.
https://bugs.python.org/issue38631