python / python/cpython

macOS: Test availability for dup3() and pipe2() to prevent crashes when building against Xcode 27

オープン
#153,711 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

3.13 3.14 3.15 3.16 extension-modules OS-ios OS-mac type-crash
主要言語
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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

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

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