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
gh-99110: Initialize frame->previous in init_frame to fix segmentation fault #100182
base: main
Are you sure you want to change the base?
Conversation
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
| ) | ||
|
|
||
| # The following line should not cause a segmentation fault. | ||
| assert frame.f_back is None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use self.assertEqual
|
|
Use self.assertEquals instead of assert.


This PR fixes a segmentation fault caused by an uninitialized variable. One way to trigger the seg. fault is to use the PyFrame_New() C API. I've also run across this segmentation fault by calling
asyncio.Task.get_stack()on cython based asyncio Task (in the grpcio module).The fix for #99110 needs to be back-ported to 3.11.