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

Cerrado
#160,873 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
Python
Estrellas
77.8k
Forks
37.7k
Merge medio
17 h 24 min
PR fusionados (30 d)
716

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de python/cpython

Todos los issues de python/cpython

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.