Skip to content

Global (macOS): disables pipe2 detection to fix a crash with the macOS 27 SDK - #2751

Closed
sohailshk wants to merge 1 commit into
fastfetch-cli:devfrom
sohailshk:fix/macos-pipe2-crash
Closed

sohailshk wants to merge 1 commit into
fastfetch-cli:devfrom
sohailshk:fix/macos-pipe2-crash

Conversation

@sohailshk

Copy link
Copy Markdown

Summary

Skips the pipe2 check on Apple platforms so that a build with the macOS 27.0 SDK no longer calls pipe2 on macOS 26, where it is NULL at runtime.

Related issue (required for new logos for new distros)

Fixes #2750

Changes

  • CMakeLists.txt: skip the pipe2 function check on Apple platforms. With the macOS 27.0 SDK, check_function_exists(pipe2) passes because the SDK's libSystem exports _pipe2. The macos(27.0) availability marking on pipe2 in unistd.h makes the call a weak import when the deployment target is 26.0, so on macOS 26 the symbol is NULL and ffPipe2() jumps to address 0 in every process spawn (Shell, Terminal, default run, --format json). With the check skipped, ffPipe2() uses the pipe() + fcntl() path it already has for platforms without pipe2.
  • CHANGELOG.md: Bugfixes entry under 2.72.0.

Red/green on macOS 26.6.2 with the macOS 27.0 SDK (default configuration, -j4): before this change the default run and --format json exit 139; with it they exit 0, and ctest passes 21/21.

Screenshots

Not a visual change.

Checklist

  • I have tested my changes locally.

The implementation and tests were written with AI assistance.

…S 27 SDK

With the macOS 27.0 SDK, pipe2 is weak-linked when the deployment
target is 26.0, so it is NULL on macOS 26 and every process spawn
crashed. Skip the pipe2 check on Apple platforms so the existing
pipe() + fcntl() path is used.
@CarterLi

Copy link
Copy Markdown
Member

I don't like the change. I don't like stucking in the past. Sorry.

@CarterLi CarterLi closed this Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Segfault on macOS 26 when built with the macOS 27 SDK (pipe2 is weak-linked and NULL)

2 participants