bpo-35370: PyEval_SetTrace() logs unraisable error#18977
Merged
vstinner merged 1 commit intopython:masterfrom Mar 16, 2020
vstinner:eval_audit_error
Merged
bpo-35370: PyEval_SetTrace() logs unraisable error#18977vstinner merged 1 commit intopython:masterfrom vstinner:eval_audit_error
vstinner merged 1 commit intopython:masterfrom
vstinner:eval_audit_error
Conversation
If PySys_Audit() fails in PyEval_SetProfile() or PyEval_SetTrace(), log the error as an unraisable exception.
Member
Author
|
@zooba @tiran: if PySys_Audit() fails in PyEval_SetProfile() or PyEval_SetTrace(), the trace/profile function is not set but an exception is "leaked" to the caller which may not be prepared for that. In Python 3.7, PyEval_SetProfile() or PyEval_SetTrace() couldn't raise an exception. Does it sound like a reasonable comprise to you to log the "unraisable" error, rather than leaking it to the caller? That's the fix for the C API. I already fixed the issue in the Python API in my previous commit: commit 309d7cc. Once the issue will be fixed in the C API and Python API in master, I will write a fix for 3.8 as well. |
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.
If PySys_Audit() fails in PyEval_SetProfile() or PyEval_SetTrace(),
log the error as an unraisable exception.
https://bugs.python.org/issue35370