Skip to content

Fix recursive thread initialization on the main thread - #836

Merged
alexcrichton merged 1 commit into
WebAssembly:mainfrom
alexcrichton:fix-pthread-issue
Jul 20, 2026
Merged

alexcrichton merged 1 commit into
WebAssembly:mainfrom
alexcrichton:fix-pthread-issue

Conversation

@alexcrichton

Copy link
Copy Markdown
Collaborator

This commit fixes issues running upstream Python tests with threads that was introduced in #820 as an accidental regression. Specifically the condition used for lazy initialization, the TID is 0, is also true during thread teardown when the TID is cleared. The condition for "lazy init needed" is switched to handle something more robust, the self-pointer in the TLS block.

This commit fixes issues running upstream Python tests with threads that
was introduced in WebAssembly#820 as an accidental regression. Specifically the
condition used for lazy initialization, the TID is 0, is also true
during thread teardown when the TID is cleared. The condition for "lazy
init needed" is switched to handle something more robust, the
self-pointer in the TLS block.
@alexcrichton

Copy link
Copy Markdown
Collaborator Author

r? @TartanLlama

@alexcrichton
alexcrichton merged commit f5372cf into WebAssembly:main Jul 20, 2026
35 checks passed
@alexcrichton
alexcrichton deleted the fix-pthread-issue branch July 20, 2026 14:27
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.

2 participants