-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-89419: gdb: fix printing AttributeError in py-locals when no frame is available #100611
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
Merged
Conversation
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
…e is available ``` Unable to read information on python frame Python Exception <class 'AttributeError'>: 'NoneType' object has no attribute 'co_name' ``` Regression in commit b4903af. While refactoring the code into a while loop, the previous early return when no frame exists went missing. We have just printed a message that we cannot get information about this, so the frame will be None, and we cannot attempt to use it. Discovered on python 3.11, in python 3.12a2 this should error out with `.is_shim()` instead of `co_name`.
This will need manual backporting to 3.11 as cherry-picking doesn't apply cleanly. Prepared at 199e6ec. |
pablogsal
approved these changes
Jan 3, 2023
pablogsal
reviewed
Jan 3, 2023
Misc/NEWS.d/next/Tools-Demos/2022-12-29-19-22-11.bpo-45256.a0ee_H.rst
Outdated
Show resolved
Hide resolved
kumaraditya303
approved these changes
Jan 3, 2023
@eli-schwartz Go ahead with the backport, thanks. |
eli-schwartz
added a commit
to eli-schwartz/cpython
that referenced
this pull request
Jan 4, 2023
… no frame is available (pythonGH-100611) ``` Unable to read information on python frame Python Exception <class 'AttributeError'>: 'NoneType' object has no attribute 'co_name' ``` Regression in commit b4903af. While refactoring the code into a while loop, the previous early return when no frame exists went missing. We have just printed a message that we cannot get information about this, so the frame will be None, and we cannot attempt to use it. Discovered on python 3.11, in python 3.12a2 this should error out with `.is_shim()` instead of `co_name`. (cherry picked from commit 8586949)
GH-100738 is a backport of this pull request to the 3.11 branch. |
kumaraditya303
pushed a commit
that referenced
this pull request
Jan 4, 2023
…n no frame is available (GH-100611) (#100738) gh-89419: gdb: fix bug causing AttributeError in py-locals when no frame is available (GH-100611) ``` Unable to read information on python frame Python Exception <class 'AttributeError'>: 'NoneType' object has no attribute 'co_name' ``` Regression in commit b4903af. While refactoring the code into a while loop, the previous early return when no frame exists went missing. We have just printed a message that we cannot get information about this, so the frame will be None, and we cannot attempt to use it. Discovered on python 3.11, in python 3.12a2 this should error out with `.is_shim()` instead of `co_name`. (cherry picked from commit 8586949)
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.
Regression in commit b4903af. While refactoring the code into a while loop, the previous early return when no frame exists went missing. We have just printed a message that we cannot get information about this, so the frame will be None, and we cannot attempt to use it.
Discovered on python 3.11, in python 3.12a2 this should error out with
.is_shim()
instead ofco_name
.