Skip to content
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

Automatically check our offsets against CPython's self-reported debug offsets #197

Merged
merged 4 commits into from
Aug 7, 2024

Conversation

godlygeek
Copy link
Contributor

And fix two mistakes that were uncovered by this!

@godlygeek godlygeek self-assigned this Aug 7, 2024
@godlygeek godlygeek force-pushed the check_against_debug_offsets branch from 742bc7a to cc5a076 Compare August 7, 2024 00:40
There's a new `co_executors` field added above `co_code_adaptive`, so
our offset for `co_code_adaptive` was off by the size of a pointer.

Signed-off-by: Matt Wozniski <[email protected]>
The `generation0` member has been removed.

Signed-off-by: Matt Wozniski <[email protected]>
Since Python 3.13, the interpreter embeds some metadata in the
PyRuntimeState structure to help debugging tools locate the information
they need. Check the offsets we're using against the offsets that
CPython says we should be using, and warn if they're different.

Signed-off-by: Matt Wozniski <[email protected]>
This lays the groundwork for us to be able to adjust to changes in the
layout of the debug offsets from one version of Python to the next.

Signed-off-by: Matt Wozniski <[email protected]>
@godlygeek godlygeek force-pushed the check_against_debug_offsets branch from cc5a076 to e782f37 Compare August 7, 2024 02:59
@pablogsal
Copy link
Member

Man, so glad we this this ❤️

@pablogsal pablogsal merged commit 5b7c726 into bloomberg:main Aug 7, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants