-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Closed
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixesOS-wasiinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
The following assert fails under a debug build with WASI:
Line 269 in a155f9f
assert(tstate->thread_id > 0); |
It's probably due to the pthread stubs always returning 0
as the thread ID:
cpython/Python/thread_pthread_stubs.h
Lines 97 to 100 in a155f9f
PyAPI_FUNC(pthread_t) pthread_self(void) | |
{ | |
return 0; | |
} |
It can probably be solved by making the assertion conditional on `HAVE_PTHREAD_STUBS not being defined:
#if !defined(HAVE_PTHREAD_STUBS) |
CPython versions tested on:
CPython main branch
Operating systems tested on:
Other
Linked PRs
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixesOS-wasiinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error