Skip to content

Conversation

@taegyunkim
Copy link
Collaborator

@taegyunkim taegyunkim commented Feb 28, 2025

#74 enabled us to read from local stack_chunk when available. And some of CPython 3.13+ tests were segfaulting since then, see #85 for examples. This PR fixes them.

Since CPython 3.13, objects other than code objects can exist as "executable" of an internal frame, see python/cpython#105727. This required us to iterate over frame objects checking the type, and we need to make sure those frame addresses are resolved using stack_chunk or copied properly.

@taegyunkim taegyunkim force-pushed the taegyunkim/stackchunk-crash branch from c6d8955 to c982a7a Compare February 28, 2025 21:13
@taegyunkim taegyunkim marked this pull request as ready for review February 28, 2025 21:14
@taegyunkim taegyunkim linked an issue Feb 28, 2025 that may be closed by this pull request
@taegyunkim taegyunkim marked this pull request as draft February 28, 2025 21:19
@taegyunkim taegyunkim marked this pull request as ready for review February 28, 2025 21:21
@taegyunkim taegyunkim changed the title fix: check if frame address is within stack chunk fix: CPython 3.13+ resolves frame addresses using stack_chunk Mar 3, 2025
Copy link
Owner

@P403n1x87 P403n1x87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having a bit of trouble reviewing this because of the formatting change. Can we remove those and maybe do them in another PR if necessary? 🙏

@taegyunkim taegyunkim merged commit fc7a068 into P403n1x87:main Mar 4, 2025
16 of 24 checks passed
@taegyunkim taegyunkim deleted the taegyunkim/stackchunk-crash branch March 4, 2025 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

crash on 3.13 w/ stack chunk

2 participants