Merge bitcoin/bitcoin#36218: build: avoid `pipe2` on Darwin (for now)
What changed, and why it matters
This is a build-system fix for Bitcoin Core on macOS. Apple's upcoming developer tools report that a function called `pipe2` is available, but older macOS versions do not actually provide it at runtime, which would cause Bitcoin Core to crash when run on those systems. The change simply skips the `pipe2` feature check on macOS so the project falls back to the older, widely supported `pipe` function. It is a reliability/stability fix, not a security vulnerability patch.
Treat as a normal build/compat fix. Backport to the 32.x branch as the author intended. No special security response is needed; users building on macOS with Xcode/CLT 27 on older deployment targets will avoid runtime crashes.
Security signals we found
No security-relevant code change: only build-system feature detection logic
No memory safety, cryptography, network, or consensus code touched
Crash-on-launch on older macOS is a denial-of-service-like symptom, but caused by toolchain/SDK availability mismatch, not by an attacker
No CVE, advisory, or vendor security disclosure referenced in commit
Evidence from the diff
The commit modifies cmake/introspection.cmake to skip the check_cxx_symbol_exists(pipe2 ...) introspection test when the target system is Darwin (macOS). On macOS, Xcode 27 / Command Line Tools 27 expose pipe2 in headers even though the deployment target may be older than macOS 27, causing compile-time detection to succeed and runtime binaries to call a missing symbol on older systems. The project already has a fallback to pipe in src/util/tokenpipe.cpp, so the only effect is to ensure the fallback is selected on macOS. No code behavior changes on other platforms.
Changed components
cmake/introspection.cmakesrc/util/tokenpipe.cpp (indirectly, via HAVE_DECL_PIPE2 macro)Inspect captured patch +3 / −1
### cmake/introspection.cmake
@@ -8,7 +8,9 @@ include(CheckCXXSymbolExists)
check_cxx_symbol_exists(O_CLOEXEC "fcntl.h" HAVE_O_CLOEXEC)
check_cxx_symbol_exists(fdatasync "unistd.h" HAVE_FDATASYNC)
check_cxx_symbol_exists(fork "unistd.h" HAVE_DECL_FORK)
-check_cxx_symbol_exists(pipe2 "unistd.h" HAVE_DECL_PIPE2)
+if (NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ check_cxx_symbol_exists(pipe2 "unistd.h" HAVE_DECL_PIPE2)
+endif()
check_cxx_symbol_exists(setsid "unistd.h" HAVE_DECL_SETSID)
if(NOT WIN32)Why this scored 33/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.