]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-97897: Prevent os.mkfifo and os.mknod segfaults with macOS 13 SDK (GH-97944...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 6 Oct 2022 19:13:46 +0000 (12:13 -0700)
committerGitHub <noreply@github.com>
Thu, 6 Oct 2022 19:13:46 +0000 (12:13 -0700)
commit60570303e419a2c9185f219fb3265e3ca2f14d9d
tree89ef9c674ea6263b02dd7613df1be53240ed5bc9
parentbd3dcb3549e9c1c26495bc3cc1a45197079bdcaf
[3.11] gh-97897: Prevent os.mkfifo and os.mknod segfaults with macOS 13 SDK (GH-97944) (#97969)

The macOS 13 SDK includes support for the `mkfifoat` and `mknodat` system calls.
 Using the `dir_fd` option with either `os.mkfifo` or `os.mknod` could result in a
 segfault if cpython is built with the macOS 13 SDK but run on an earlier
 version of macOS. Prevent this by adding runtime support for detection of
 these system calls ("weaklinking") as is done for other newer syscalls on
 macOS.
(cherry picked from commit 6d0a0191a4e5477bd843e62c24d7f3bcad4fd5fc)

Co-authored-by: Ned Deily <nad@python.org>
Lib/test/test_posix.py
Misc/NEWS.d/next/macOS/2022-10-05-15-26-58.gh-issue-97897.Rf-C6u.rst [new file with mode: 0644]
Modules/posixmodule.c