Thread ID assertion in pystate.c
failing under WASI
#110455
Labels
3.12
only security fixes
3.13
bugs and security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
OS-wasi
type-bug
An unexpected behavior, bug, or error
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
The following assert fails under a debug build with WASI:
cpython/Python/pystate.c
Line 269 in a155f9f
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
It can probably be solved by making the assertion conditional on `HAVE_PTHREAD_STUBS not being defined:
cpython/Include/cpython/pthread_stubs.h
Line 4 in a155f9f
CPython versions tested on:
CPython main branch
Operating systems tested on:
Other
Linked PRs
assert(tstate->thread_id > 0)
with#ifndef HAVE_PTHREAD_STUBS
#110487assert(tstate->thread_id > 0)
withGH-ifndef HAVE_PTHREAD_STUBS
(GH-110487) #110491The text was updated successfully, but these errors were encountered: