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

クローズ
#160,873 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
Python
スター
77.8k
フォーク
37.7k
平均マージ
17時間 24分
マージ済み PR(30日)
716

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

python/cpython のほかの issue

python/cpython の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。