Skip to content

fix(libkernel): build the file, module and rtld calls on macOS hosts - #10552

Merged
oneandonlydean merged 20 commits into
boykopovar:mainfrom
krishalivaibhav:fix/macos-libkernel-six
Nov 2, 2026
Merged

oneandonlydean merged 20 commits into
boykopovar:mainfrom
krishalivaibhav:fix/macos-libkernel-six

Conversation

@krishalivaibhav

@krishalivaibhav krishalivaibhav commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What

Builds libkernel on macOS hosts. Six files used Linux-only APIs and did not compile there; each now has a macOS path behind __APPLE__, and the Linux and Windows paths are unchanged:

  • File/src/NativeStat.cpp: st_atimespec/st_mtimespec/st_ctimespec, and a fstatat walk for guest paths that no longer fit PATH_MAX once the host root is prepended.
  • File/src/SharedMemory.cpp: an unlinked temp file instead of memfd_create; descriptors are recognised through F_GETPATH.
  • File/src/Stdio.cpp: statfs from sys/mount.h instead of sys/vfs.h, plus the directory-read and vector-IO differences of Darwin.
  • Module/src/DynamicLoader.cpp, Module/src/ModuleInfo.cpp, System/src/Rtld.cpp: dlopen/dladdr handles and Mach-O segment walks instead of link.h/dl_iterate_phdr.

A second commit makes File/src/DirectoryDescriptor.cpp resolve a descriptor's path through fcntl(F_GETPATH) on macOS, where /proc/self/fd does not exist (fdopendir returned ENOTDIR).

A third commit (rebased f023a5e691) gives guest_module_info a macOS expectation: eh_frame must match the image's __eh_frame section from getsectiondata, and eh_frame_hdr is 0 for the fixture, which is not a relinked image.

Extracted from iamthehimansh's feat/macos-port (#8658); Co-authored-by on both commits. The 22 explanatory // comments of the branch version were dropped to follow the no-comments rule.

Further commits:

  • ee34c291e1 (was 997f6cfd4, iamthehimansh): long-path stat prefixes are opened with O_SEARCH on macOS, so a directory without read permission can still be walked.
  • 559568f8d8 (was 458b30a05): sceKernelGetdirentries and HostWrite guard their guest outputs on macOS, with the S_ISDIR check the Linux path has.
  • 74cfbed70d: Rtld.cpp imageContaining returns nullptr on macOS for an address outside every image, as main does on Linux and Windows after fix(libkernel): answer the thread atexit references as measured on a PS5 #10243, instead of throwing.
  • 5200c2edd2: named shm_open and named shm_unlink call NotImplemented_nid_no_patch on macOS, as docs/dev/debt/libkernel.md says. The host name /anyps5-shm- plus 40 hex digits is 52 bytes against macOS PSHMNAMLEN 31, and /dev/shm does not exist there. Anonymous shared memory is unchanged.
  • a6d91c88dd: a debt entry for the macOS module info fields left at 0 (tls_*, init_proc_addr, fini_proc_addr, eh_frame_hdr_*) and for the non-empty Mach-O __eh_frame case the guest_module_info fixture does not cover.
  • e95186ba55: the macOS NativeIsPipe matches only FIFOs whose fstatfs fails, as pipe() descriptors do, and NativeFstatfs uses it, so a named FIFO is no longer a pipe.
  • fa9d3c8088: a zero-length readv, writev, preadv or pwritev on macOS checks the descriptor, then its access mode, then (for the positioned calls) that it is seekable, before returning 0. This is the FreeBSD 11.4 order; Linux checks seekability first, so a write-only pipe end gives ESPIPE there and EBADF here.
  • 787e08bb5c: an unlinked anyps5-shm- file counts as shared memory only in the temporary directory CreateAnonymousFile uses; the not-implemented traces name shm_open and shm_unlink.
  • 1490561626: debt entries for the macOS sceKernelGetdirentries (full re-read, O(n²) paging, index offsets) and for macOS opening every module with RTLD_GLOBAL.
  • f82257e8f9: dlclose on macOS unregisters a relinked image under the __APS5DATA,__meta load bias that dl_iterate_phdr reports and mprotect registers it under, not under its Mach-O header. The header and the load bias are found once when the module is opened, so ImageBase and its throw are gone.
  • f374a777a2: the macOS sceKernelGetdirentries reads an archived app directory through File::ReadDirectoryDescriptor, as the Linux copy does since 0a64d23bd; the HostWrite checks now come before fstat, as there.
  • f58b1c4523: the shared-memory check resolves the temporary directory once.
  • ce09c08f44: on macOS a lookup on the main program's handle (sceKernelDlsym with handle 0) goes through the default-scope path, because dlopen(NULL) there is equivalent to RTLD_DEFAULT; a module loaded without 0x100 is no longer found through it. DefaultScopeSymbol returns null for a hit in such a module, and the main program never counts as one.
  • 5afd6df8cc: sceKernelGetModuleInfoFromAddr on macOS reports eh_frame_hdr for a relinked image from the PT_GNU_EH_FRAME header in __APS5DATA,__meta, the source sceKernelGetModuleInfoForUnwind uses. FindImage requires the same 0x60-byte __meta minimum as dl_iterate_phdr.
  • 32d288095f: after a long-path split, leading slashes of the rest are dropped, so a // at the split point is not resolved from the host root.
  • 3dffebe9ec: removes the duplicate ftruncate and readv entries the rebase added, describes the handle-0 lookup in the module scope entry, adds the entries skipped or repeated when a directory changes between getdirentries calls to the macOS directory entry, and the eh_frame_hdr source to the module info entry.

Tested

Rebased onto main 809c7fa (one conflict, in the include block of DynamicLoader.cpp after #10627; resolved by keeping main's HostThreadLocal.hpp include), macOS x86_64 Release on Apple Silicon M2:

  • the seven changed libkernel files (DirectoryDescriptor, NativeStat, SharedMemory, Stdio, DynamicLoader, ModuleInfo, Rtld) compile with 0 errors;
  • Stdio.cpp, SharedMemory.cpp and DynamicLoader.cpp compile with 0 errors at ea0213b6ac, and all seven again at this head, with no warnings from their lines; a standalone x86_64 program with the new empty-vector, shared-memory-directory and pipe checks gives the expected result in 12 cases (EBADF, ESPIPE, 0; temporary directory matches, another directory does not; pipe() is a pipe, a named FIFO is not);
  • a standalone x86_64 program linked against the Rtld.cpp and SharedMemory.cpp objects (other symbols stubbed) checks that _sceKernelRtldThreadAtexitIncrement returns -1 and Decrement returns 0 for &local and nullptr, and that named shm_open and shm_unlink on a valid name reach NotImplemented_nid_no_patch. It prints ok.

Not run on the rebased head: the guest_* test programs. #10366 is merged, but on current main libkernel still does not build on macOS without #7631, #7804 and #4630 (Thread.cpp, Exception.cpp, DirectMemory.cpp), so guest_module_info, guest_filesystem, guest_dynamic_loader and the other tests below were not re-run.

Earlier results on the pre-rebase head (macOS: local integration of main (e7e3e9c) + #10419 + #10366 + #10369 + #7631 + #7804 + #4630 + this PR + #10853): guest_module_info, guest_module_args, guest_libc_threads, guest_statvfs, guest_file_timestamps, guest_pthread_stack, guest_raise_exception, guest_fdopendir, guest_kernel_sys, guest_filesystem passed; guest_aio needs #10543 and guest_dynamic_loader needs #10627.

Linux: Ubuntu 24.04, g++ 13.3.0, x86-64 Release, on main 60465af + the first commit: libkernel builds with no warnings from the six files. The later commits are __APPLE__-only.

Checklist

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 5021 sceKernelGetdirentries
PR 9947 docs/dev/debt/libkernel.md L161-162

Exports introduced here that are already present in main:

  • sceKernelGetdirentries

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 4630 docs/dev/debt/libkernel.md
PR 5021 core/libs/prx/libkernel/File/src/NativeStat.cpp
core/libs/prx/libkernel/File/src/SharedMemory.cpp
core/libs/prx/libkernel/File/src/Stdio.cpp
core/libs/prx/libkernel/Module/src/DynamicLoader.cpp
core/libs/prx/libkernel/Module/src/ModuleInfo.cpp
core/libs/prx/libkernel/System/src/Rtld.cpp
docs/dev/debt/libkernel.md
PR 6936 core/libs/prx/libkernel/File/src/Stdio.cpp
docs/dev/debt/libkernel.md
PR 7088 docs/dev/debt/libkernel.md
PR 7105 docs/dev/debt/libkernel.md
PR 7121 core/libs/prx/libkernel/File/src/Stdio.cpp
docs/dev/debt/libkernel.md
PR 7135 docs/dev/debt/libkernel.md
PR 7149 docs/dev/debt/libkernel.md
PR 7192 docs/dev/debt/libkernel.md
PR 7447 core/libs/prx/libkernel/File/src/Stdio.cpp
docs/dev/debt/libkernel.md
PR 7464 docs/dev/debt/libkernel.md
PR 7804 docs/dev/debt/libkernel.md
PR 9019 core/libs/prx/libkernel/File/src/SharedMemory.cpp
core/libs/prx/libkernel/File/src/Stdio.cpp
PR 9156 docs/dev/debt/libkernel.md
PR 9199 docs/dev/debt/libkernel.md
PR 9293 core/libs/prx/libkernel/File/src/Stdio.cpp
docs/dev/debt/libkernel.md
PR 9297 core/libs/prx/libkernel/File/src/Stdio.cpp
docs/dev/debt/libkernel.md
PR 9302 core/libs/prx/libkernel/File/src/Stdio.cpp
docs/dev/debt/libkernel.md
PR 9389 docs/dev/debt/libkernel.md
PR 9557 docs/dev/debt/libkernel.md
PR 9566 docs/dev/debt/libkernel.md
PR 9843 docs/dev/debt/libkernel.md
PR 10025 docs/dev/debt/libkernel.md
PR 10319 docs/dev/debt/libkernel.md
PR 10442 docs/dev/debt/libkernel.md
PR 11831 core/libs/prx/libkernel/File/src/Stdio.cpp
PR 11939 docs/dev/debt/libkernel.md
PR 12104 docs/dev/debt/libkernel.md
PR 12560 core/libs/prx/libkernel/File/src/DirectoryDescriptor.cpp
core/libs/prx/libkernel/File/src/Stdio.cpp
docs/dev/debt/libkernel.md
PR 14212 docs/dev/debt/libkernel.md

@krishalivaibhav

Copy link
Copy Markdown
Contributor Author

Linux check: Ubuntu 24.04, g++ 13.3.0, x86-64 Release (x86-64 chroot under Rosetta in an Apple Silicon VM), on main 60465af + this commit (cherry-picked cleanly) + #10562. libkernel builds with no warnings or errors from the six files.

Tests: guest_libc_threads, guest_statvfs, guest_file_timestamps and guest_pthread_stack pass. guest_raise_exception (the subprocess aborts) and guest_module_args (relinker assertion first load segment not at file offset 0, ElfMapper.cpp:399) fail the same way on plain main 60465af in this VM, so they come from the VM setup, not from this PR.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The macOS AppendingWritev fallback has a correctness hole and overlaps directly with the helper in open PR #10543. Here it treats any descriptor with O_APPEND as an appendable regular file and calls writev even when the saved lseek position is negative. For example, an O_APPEND pipe/non-regular descriptor can be written successfully here although pwritev should fail with ESPIPE; if saving the offset fails, the code also performs the write without being able to restore the shared descriptor position. #10543’s WritevAtEnd checks fstat/S_ISREG, refuses the fallback when the offset cannot be saved, and covers the same pwrite/pwritev behavior. Please coordinate this shared path with #10543 (or make this PR depend on/reuse its helper) and preserve the native failure behavior for non-regular or non-seekable descriptors. A regression for an O_APPEND pipe and a regular-file offset-preservation case would cover the boundary.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 24, 2026
@maximilianfv

Copy link
Copy Markdown
Contributor

@krishalivaibhav #10627 touches the same loaderError buffer in DynamicLoader.cpp that this PR raises to 4096 bytes on macOS: it removes the limit on every host instead. A reviewer asked us to agree a merge order. Would you be OK with #10627 landing first, so this PR drops its loaderError hunk on its next rebase? If yours merges first, I'll rebase mine.

AI-assisted: yes

@krishalivaibhav

Copy link
Copy Markdown
Contributor Author

@maximilianfv yes, fine with #10627 landing first. I'll drop the loaderError hunk from this PR on its next rebase.

@imellag imellag left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested head 972a2c6525 on Apple M4 Pro, macOS 27.0.1, Apple clang, x86-64 Release under Rosetta 2. Two points for the rebase.

Conflict in ModuleInfo.cpp. On main 3fcb5e4d76, NativeStat.cpp, SharedMemory.cpp, Stdio.cpp, DynamicLoader.cpp and Rtld.cpp compile with this PR, but ModuleInfo.cpp conflicts. #10230 rewrote sceKernelGetModuleInfoFromAddr:

  • it accepts flags 1 and 2;
  • it leaves st_size 0;
  • it builds a GuestImage on every host for the flags == 2 SystemImage check.

The macOS branch needs the same. Locally I used this, taking the image header from dladdr, which is what the Apple SystemImage reads:

#elif defined(__APPLE__)
    Dl_info symbol{};
    const bool found = Fill(static_cast<std::uintptr_t>(address), result) &&
        ::dladdr(reinterpret_cast<const void*>(address), &symbol) && symbol.dli_fbase != nullptr;
    const GuestImage image{nullptr, found ? reinterpret_cast<std::uintptr_t>(symbol.dli_fbase) : 0};

Test results. With that and the other open macOS build PRs (the same stack as in my review of #7631), guest_dynamic_loader, guest_module_args, guest_libc_threads, guest_statvfs and guest_file_timestamps pass.

guest_module_info aborts at GuestModuleInfo.cpp:68 (info.eh_frame_addr != 0). Apple ld gives the fixture only compact unwind information: otool -l libguest_module_fixture.dylib lists __text and __unwind_info, with no __eh_frame. So the Mach-O branch of Fill leaves the eh_frame fields 0. The eh_frame_hdr check on the next lines can't hold for Mach-O either.

AI-assisted: yes

@krishalivaibhav

Copy link
Copy Markdown
Contributor Author

@MarcZX10 thanks. I removed the macOS AppendingWritev fallback from Stdio.cpp completely (the function, the NativePwrite retry and the sceKernelPwritev call), so this PR no longer touches the O_APPEND positioned-write path, and #10543's WritevAtEnd covers it. I also dropped the loaderError size hunk in favour of #10627, as agreed with maximilianfv.

Since the push I also added a second commit: DirectoryDescriptorPath resolves a descriptor through fcntl(F_GETPATH) on macOS, because /proc/self/fd does not exist there. This is the same change as in iamthehimansh's feat/macos-port, and he is credited as co-author. The branch is rebased on main 5ed5427. That rebase changed sceKernelGetModuleInfoFromAddr: it now follows main's GuestImage flow, with an __APPLE__ dladdr branch.

Tested on M2, x86_64 Release, main + #10419 + #10366 + #10369 + #7631 + #7804 + #4630 + this PR:

@krishalivaibhav

Copy link
Copy Markdown
Contributor Author

@imellag thanks for testing. The rebased head e60d9dfa3 (on main 5ed5427) has the same ModuleInfo.cpp change: it follows main's GuestImage flow and uses an __APPLE__ dladdr branch with dli_fbase as the image, and it leaves st_size 0.

About guest_module_info: agreed. Apple ld emits only __unwind_info for the fixture, so a Mach-O image has no eh_frame for Fill to report. Those checks need a macOS expectation in the test, or a decision on what the fields should hold for Mach-O images. I'd keep that out of this PR and handle it with the module-info fixture work.

AI-assisted: yes (Claude Code)

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed exact head e60d9dfa3a911ebdc0847f229eebae1878e4e487. The earlier O_APPEND fallback concern is resolved by removing that path, and the F_GETPATH addition matches the macOS descriptor-path need. I cannot approve this head yet for two concrete reasons:

  • GitHub currently reports the branch as DIRTY against main; please rebase and rerun checks.
  • The existing cross-platform guest_module_info test still requires nonzero eh_frame and eh_frame_hdr for every non-Windows host. The reported macOS fixture has only __unwind_info, and the new Mach-O Fill path leaves both fields zero. The author’s own test note identifies this mismatch. Please add an explicit macOS expectation/fixture for these fields (or otherwise make the test pass with documented semantics) and run guest_module_info on macOS.

The hosted product jobs are skipped by path policy, so they do not cover this macOS behavior.

@MarcZX10

Copy link
Copy Markdown
Contributor

Thanks for confirming the macOS fixture has no .eh_frame and that the Mach-O Fill path therefore returns zero for eh_frame_addr/eh_frame_hdr. The review request remains open: the shared guest_module_info test currently asserts both are nonzero on every non-Windows host, so this head cannot pass that test on macOS. Please either add an explicit Mach-O/macOS expectation (with a fixture or platform condition that reflects the format) and run guest_module_info on macOS, or document a concrete decision to keep this behavior out of the PR and ensure the test does not fail for this supported configuration. The branch also remains CONFLICTING against current main; please refresh it after the test change so the final checks apply to a mergeable head. I have not attempted a rebase or run a local macOS build.

@krishalivaibhav

Copy link
Copy Markdown
Contributor Author

@MarcZX10 thanks. I rebased onto main e7e3e9c. There were two conflicts: in SharedMemory.cpp I kept main's new Windows named-shared-memory block unchanged and put the macOS branch after it; in GuestModuleInfo.cpp I kept main's new Api.hpp include. All files compile against the new SDK headers.

I added a third commit for guest_module_info:

  • Fill already reports __eh_frame through getsectiondata when the image has one, so ModuleInfo.cpp is unchanged.
  • On macOS the test now requires eh_frame_addr/eh_frame_size to equal what getsectiondata(header, "__TEXT", "__eh_frame") returns for the fixture, and eh_frame_hdr_* to be 0 (Mach-O has no such section). The Linux and Windows expectations are unchanged.
  • The fixture's -Wl,--no-as-needed link option and the ELF-only nid_patcher_dynamic_strings test are now skipped on Apple as well as Windows, so libguest_module_fixture.dylib links on macOS.

Tested on M2, x86_64 Release, main e7e3e9c + #10419 + #10366 + #10369 + #7631 + #7804 + #4630 + this PR + #10853 (O_CREAT on a directory returns EISDIR), with 0 failed objects:

  • pass: guest_module_info, guest_module_args, guest_libc_threads, guest_statvfs, guest_file_timestamps, guest_pthread_stack, guest_raise_exception, guest_fdopendir, guest_kernel_sys, guest_filesystem;
  • guest_dynamic_loader (from the previous run, on main 2dc8560) aborts at GuestDynamicLoader.cpp:66: the 512-byte loaderError buffer truncates the "was not relinked" message because the build path is long. That is what fix(libkernel): keep dlerror messages whole #10627 fixes, so I left it out of this PR as agreed with maximilianfv. With a 4096-byte buffer (local only, not committed) the test passes.

AI-assisted: yes (Claude Code)

iamthehimansh and others added 17 commits October 31, 2026 14:32
The long-path fallback in NativeStat opened each intermediate directory with
O_RDONLY | O_DIRECTORY, which needs read permission on it. stat and fstatat
only need search permission, so a path through an execute-only directory
failed with EACCES once it crossed PATH_MAX. O_SEARCH (O_EXEC | O_DIRECTORY
on Darwin) needs only search permission and still rejects a non-directory.
The macOS sceKernelGetdirentries wrote *basep and the entry records into buf
without entering GuestArena::HostWrite, so the write-watch host-write path
never saw those writes. It now opens HostWrite guards for buf over nbytes and
for basep before it moves the descriptor offset, and holds them through every
write, as the Linux path does. It also rejects a non-directory with EINVAL
before the guards, matching Linux.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ed on macOS

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rite on macOS

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tory

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hared memory

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…odule info entries

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@krishalivaibhav
krishalivaibhav force-pushed the fix/macos-libkernel-six branch from 2f75dd5 to 3dffebe Compare October 31, 2026 09:06
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 31, 2026
@javierUDP

Copy link
Copy Markdown
Contributor

@imellag's A/B above already shows this PR is required for the libraries to build on macOS: pull it out of that twelve-PR set and ModuleInfo.cpp stops at 'link.h' file not found. What I could not find anywhere is the same question asked of this PR alone against unmodified main, without a series or a set around it, so here it is on the current head 3dffebe9ec merged into main 9fe758d752 (clean merge, no conflicts).

One thing has to be removed first in both arms, or there is nothing to measure: main's duplicate add_test in core/libs/tests/write_watch/CMakeLists.txt stops the macOS configure before a single target is built. #13220 is the fix; both numbers below are on that same tree with it applied.

Files that fail to compile: 14 on main, 8 with this pull request. The six it changes all compile, and nothing that compiled before stopped compiling:

Now compiling Error it had on main
libkernel/File/src/NativeStat.cpp no member named 'st_atim' in 'stat'
libkernel/File/src/SharedMemory.cpp use of undeclared identifier 'MFD_CLOEXEC'
libkernel/Module/src/DynamicLoader.cpp 'link.h' file not found
libkernel/Module/src/ModuleInfo.cpp 'link.h' file not found
libkernel/System/src/Rtld.cpp 'link.h' file not found
libkernel/File/src/Stdio.cpp

File/src/DirectoryDescriptor.cpp is also changed here; it compiled before and still does.

The useful half is the residue. Every one of the eight that remain belongs to another open pull request, so none of them is an argument against this one:

File Error Pull request
libkernel/DirectMemory/DirectMemory.cpp #7631
libkernel/Pthread/src/Thread.cpp pthread_getattr_np, pthread_getcpuclockid, RUSAGE_THREAD #7804
libkernel/System/src/Process.cpp #7804
libkernel/System/src/Exception.cpp REG_RAX and the other REG_* of the Linux ucontext #4630
libSceAgcDriver/Execution/src/GuestMemory.cpp (3 test targets) 'link.h' file not found #6209, #6187
libSceLibreSsl3/tests/Cipher.cpp std::initializer_list not declared #14159

I checked each one against that pull request's changed-file list rather than inferring it from the error.

Environment: macOS 27.2 (build 26B123), Apple M5, Apple clang 21.0.0 from the Xcode command-line tools, CMake 4.4.0, Ninja 1.13.2, Release with BUILD_TESTING=ON, x86-64 as CMakeLists.txt requires on Apple silicon, and -DSDL_CCACHE=OFF for a local ccache problem of mine. Counted with ninja -k 0 so one failure does not hide the others; the numbers are distinct FAILED: compile steps, not diagnostics.

This measures compilation only. I did not run anything: libkernel still does not link on macOS, so the runtime results in this thread remain @maximilianfv's and @imellag's, not mine.

AI-assisted: yes.

@oneandonlydean
oneandonlydean dismissed maximilianfv’s stale review November 1, 2026 03:09

Stale: all four points are addressed on 3dffebe (duplicate debt entry removed, handle-0 dlsym fixed, dead fallback loop removed, getdirentries-after-delete documented in the debt file).

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@krishalivaibhav we're going to merge this one before #12682, #12688 and #12700, once CI is green on this head, rather than after them as the Depends on line says. Those three are held for a while, and this PR is ready now: maximilianfv's four points are all addressed, and on an M4 every file it changes compiles. No rebase needed from you; when they land, the conflict is two small Stdio.cpp hunks (your __APPLE__ empty-iovec guard next to their ThreadCancel::Native wrapper), and both are kept.

@krishalivaibhav

Copy link
Copy Markdown
Contributor Author

@oneandonlydean Thanks, that works for me. I've updated the Depends on line to match: this goes first, and #12682, #12688 and #12700 follow. @Felipebmaitan, this changes the order we agreed: when #10552 lands, your Stdio.cpp hunks keep the __APPLE__ empty-iovec guard next to the ThreadCancel::Native wrapper.

@MarcZX10 The Depends on line your review flagged is now current, so could you take another look when you have time?

@javierUDP Thanks for testing this PR on its own against main.

@oneandonlydean
oneandonlydean merged commit b07388b into boykopovar:main Nov 2, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants