Emscripten: Remove obsolete `pthread_getattr_np` workaround in `ceval.c`

Chiusa
#160,873 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Read the workaround in Python/ceval.c and the Emscripten version in Platforms/emscripten/config.toml. Check how the current toolchain handles pthread_getattr_np() and run the relevant Emscripten tests for stack boundary detection and recursion protection. Done means the obsolete workaround is removed and both behaviors still work with the current toolchain.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

interpreter-core OS-emscripten type-bug
Bug report
Description

The workaround in Python/ceval.c was introduced to address a broken pthread_getattr_np() implementation in Emscripten versions prior to 4.0.6 (GH-130396, #131088).

The existing comment explicitly describes it as temporary:

#if defined(__EMSCRIPTEN__)

// Temporary workaround to make `pthread_getattr_np` work on Emscripten.
// Emscripten 4.0.6 will contain a fix:
// https://github.com/emscripten-core/emscripten/pull/23887

However, the workaround is still enabled for all Emscripten versions because it only checks __EMSCRIPTEN__, regardless of the toolchain version.

The upstream fix was included in Emscripten 4.0.6, and CPython now uses Emscripten 6.0.13 (Platforms/emscripten/config.toml).

Therefore, this workaround appears to be obsolete and could potentially be removed, allowing CPython to use Emscripten's native pthread_getattr_np() implementation.

The removal should be verified against the current Emscripten toolchain to ensure that stack boundary detection and recursion protection continue to work correctly.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs
  • gh-160874
  • gh-160902
Lingua principale
Python
Stelle
77.8k
Fork
37.7k
Merge medio
17h 24m
PR unite (30g)
716

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python/cpython

Tutte le issue di python/cpython

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.