macOS: Test availability for dup3() and pipe2() to prevent crashes when building against Xcode 27
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Crash report
What happened?
This year's Apple OS releases (macOS/iOS/tvOS/watchOS/visionOS 27) add support for dup3() and pipe2(). When building for macOS using Xcode 27 beta but running on macOS 26, configure detects these functions, but Python crashes when it tries to use them. As a temporary fix, I'm passing ac_cv_func_dup3=no ac_cv_func_pipe2=no to configure. The real fix will be to use availability checks in Modules/posixmodule.c for dup3() and pipe2(), like gh-97897 does
Prototypes added to sys/unistd.h in the *27 SDK:
__API_AVAILABLE(macos(27.0), ios(27.0), tvos(27.0), watchos(27.0), visionos(27.0))
int dup3(int, int, int);
__API_AVAILABLE(macos(27.0), ios(27.0), tvos(27.0), watchos(27.0), visionos(27.0))
int pipe2(int [2], int);
@ned-deily @ronaldoussoren
CPython versions tested on:
3.13
Operating systems tested on:
macOS
Output from running 'python -VV' on the command line:
No response
Linked PRs
- gh-154718
- gh-155174
- gh-155202
- gh-155206
- gh-155211
- gh-155222
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Modules/posixmodule.c と gh-97897 の可用性チェックの先例を読み、その後、報告に記載された Xcode 27/macOS 26 の configure および build シナリオを再現してください。新しい SDK に対してビルドしながら、古い macOS バージョン上で実行する場合に dup3() と pipe2() が安全に処理され、関連する build または runtime のチェックが通れば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- c, macos, python
- 領域
- build-system, operating-systems
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 25/100