Skip to content

[3.13] Add debug offsets for free threaded builds (GH-123041)#123055

Merged
pablogsal merged 2 commits intopython:3.13from
miss-islington:backport-d7a3df9-3.13
Aug 18, 2024
Merged

[3.13] Add debug offsets for free threaded builds (GH-123041)#123055
pablogsal merged 2 commits intopython:3.13from
miss-islington:backport-d7a3df9-3.13

Conversation

@miss-islington
Copy link
Copy Markdown
Contributor

(cherry picked from commit d7a3df9)

Co-authored-by: Pablo Galindo Salgado Pablogsal@gmail.com

(cherry picked from commit d7a3df9)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
@pablogsal
Copy link
Copy Markdown
Member

CC @Yhg1s

This patch adds more offsets to allow debuggers to work with free threaded builds by exposing fields that can change between the two and making identification of the GIL easier.

It also ensures the cookie is only in one place in the binary because we have two copies of it currently due to how we handle initialization.

@pablogsal
Copy link
Copy Markdown
Member

pablogsal commented Aug 15, 2024

The ABI file needs to be regenerated because the PyRuntimeState structure had changed but note that the ABI has not changed since this field is always passed as a pointer and its size is not really public (the check doesn't now it).

If you are okey with the change I can regenerate the file and update the PR

@Yhg1s
Copy link
Copy Markdown
Member

Yhg1s commented Aug 17, 2024

Yeah, this seems fine to go into rc2.

@pablogsal pablogsal requested a review from encukou as a code owner August 18, 2024 14:38
@pablogsal pablogsal enabled auto-merge (squash) August 18, 2024 14:45
@pablogsal pablogsal merged commit 01ce10c into python:3.13 Aug 18, 2024
@miss-islington miss-islington deleted the backport-d7a3df9-3.13 branch January 2, 2026 18:46
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.

3 participants