Commit 989a5a6
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.
(cherry picked from commit 6d0a019)
Co-authored-by: Ned Deily <nad@python.org>1 parent e2591e4 commit 989a5a6
3 files changed
Lines changed: 80 additions & 8 deletions
File tree
- Lib/test
- Misc/NEWS.d/next/macOS
- Modules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2066 | 2066 | | |
2067 | 2067 | | |
2068 | 2068 | | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
2069 | 2091 | | |
2070 | 2092 | | |
2071 | 2093 | | |
| |||
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 | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
| 174 | + | |
| 175 | + | |
172 | 176 | | |
173 | 177 | | |
174 | 178 | | |
| |||
10554 | 10558 | | |
10555 | 10559 | | |
10556 | 10560 | | |
| 10561 | + | |
| 10562 | + | |
| 10563 | + | |
10557 | 10564 | | |
10558 | 10565 | | |
10559 | 10566 | | |
10560 | 10567 | | |
10561 | | - | |
10562 | | - | |
10563 | | - | |
| 10568 | + | |
| 10569 | + | |
| 10570 | + | |
| 10571 | + | |
| 10572 | + | |
| 10573 | + | |
| 10574 | + | |
| 10575 | + | |
| 10576 | + | |
10564 | 10577 | | |
10565 | 10578 | | |
10566 | 10579 | | |
10567 | 10580 | | |
10568 | 10581 | | |
| 10582 | + | |
| 10583 | + | |
| 10584 | + | |
| 10585 | + | |
| 10586 | + | |
| 10587 | + | |
| 10588 | + | |
| 10589 | + | |
10569 | 10590 | | |
10570 | 10591 | | |
10571 | 10592 | | |
| |||
10606 | 10627 | | |
10607 | 10628 | | |
10608 | 10629 | | |
| 10630 | + | |
| 10631 | + | |
| 10632 | + | |
10609 | 10633 | | |
10610 | 10634 | | |
10611 | 10635 | | |
10612 | 10636 | | |
10613 | | - | |
10614 | | - | |
10615 | | - | |
| 10637 | + | |
| 10638 | + | |
| 10639 | + | |
| 10640 | + | |
| 10641 | + | |
| 10642 | + | |
| 10643 | + | |
| 10644 | + | |
| 10645 | + | |
10616 | 10646 | | |
10617 | 10647 | | |
10618 | 10648 | | |
10619 | 10649 | | |
10620 | 10650 | | |
| 10651 | + | |
| 10652 | + | |
| 10653 | + | |
| 10654 | + | |
| 10655 | + | |
| 10656 | + | |
10621 | 10657 | | |
10622 | 10658 | | |
10623 | 10659 | | |
| |||
15466 | 15502 | | |
15467 | 15503 | | |
15468 | 15504 | | |
| 15505 | + | |
| 15506 | + | |
| 15507 | + | |
| 15508 | + | |
| 15509 | + | |
| 15510 | + | |
| 15511 | + | |
| 15512 | + | |
15469 | 15513 | | |
15470 | 15514 | | |
15471 | 15515 | | |
| |||
15599 | 15643 | | |
15600 | 15644 | | |
15601 | 15645 | | |
15602 | | - | |
| 15646 | + | |
15603 | 15647 | | |
15604 | 15648 | | |
15605 | 15649 | | |
15606 | | - | |
| 15650 | + | |
15607 | 15651 | | |
15608 | 15652 | | |
15609 | 15653 | | |
| |||
0 commit comments