Commit 79fbf97
pythongh-97897: Prevent os.mkfifo and os.mknod segfaults with macOS 13 SDK (pythonGH-97944)
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.1 parent d458682 commit 79fbf97
File tree
3 files changed
+80
-8
lines changed- Lib/test
- Misc/NEWS.d/next/macOS
- Modules
3 files changed
+80
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2090 | 2090 | | |
2091 | 2091 | | |
2092 | 2092 | | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
2093 | 2115 | | |
2094 | 2116 | | |
2095 | 2117 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| |||
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| 180 | + | |
| 181 | + | |
178 | 182 | | |
179 | 183 | | |
180 | 184 | | |
| |||
10619 | 10623 | | |
10620 | 10624 | | |
10621 | 10625 | | |
| 10626 | + | |
| 10627 | + | |
| 10628 | + | |
10622 | 10629 | | |
10623 | 10630 | | |
10624 | 10631 | | |
10625 | 10632 | | |
10626 | | - | |
10627 | | - | |
10628 | | - | |
| 10633 | + | |
| 10634 | + | |
| 10635 | + | |
| 10636 | + | |
| 10637 | + | |
| 10638 | + | |
| 10639 | + | |
| 10640 | + | |
| 10641 | + | |
10629 | 10642 | | |
10630 | 10643 | | |
10631 | 10644 | | |
10632 | 10645 | | |
10633 | 10646 | | |
| 10647 | + | |
| 10648 | + | |
| 10649 | + | |
| 10650 | + | |
| 10651 | + | |
| 10652 | + | |
| 10653 | + | |
| 10654 | + | |
10634 | 10655 | | |
10635 | 10656 | | |
10636 | 10657 | | |
| |||
10671 | 10692 | | |
10672 | 10693 | | |
10673 | 10694 | | |
| 10695 | + | |
| 10696 | + | |
| 10697 | + | |
10674 | 10698 | | |
10675 | 10699 | | |
10676 | 10700 | | |
10677 | 10701 | | |
10678 | | - | |
10679 | | - | |
10680 | | - | |
| 10702 | + | |
| 10703 | + | |
| 10704 | + | |
| 10705 | + | |
| 10706 | + | |
| 10707 | + | |
| 10708 | + | |
| 10709 | + | |
| 10710 | + | |
10681 | 10711 | | |
10682 | 10712 | | |
10683 | 10713 | | |
10684 | 10714 | | |
10685 | 10715 | | |
| 10716 | + | |
| 10717 | + | |
| 10718 | + | |
| 10719 | + | |
| 10720 | + | |
| 10721 | + | |
10686 | 10722 | | |
10687 | 10723 | | |
10688 | 10724 | | |
| |||
15525 | 15561 | | |
15526 | 15562 | | |
15527 | 15563 | | |
| 15564 | + | |
| 15565 | + | |
| 15566 | + | |
| 15567 | + | |
| 15568 | + | |
| 15569 | + | |
| 15570 | + | |
| 15571 | + | |
15528 | 15572 | | |
15529 | 15573 | | |
15530 | 15574 | | |
| |||
15658 | 15702 | | |
15659 | 15703 | | |
15660 | 15704 | | |
15661 | | - | |
| 15705 | + | |
15662 | 15706 | | |
15663 | 15707 | | |
15664 | 15708 | | |
15665 | | - | |
| 15709 | + | |
15666 | 15710 | | |
15667 | 15711 | | |
15668 | 15712 | | |
| |||
0 commit comments