Skip to content

make the fuzzer vaguely work on macOS#25981

Merged
mlugg merged 8 commits into
ziglang:masterfrom
mlugg:macos-fuzz-2
Nov 20, 2025
Merged

make the fuzzer vaguely work on macOS#25981
mlugg merged 8 commits into
ziglang:masterfrom
mlugg:macos-fuzz-2

Conversation

@mlugg

@mlugg mlugg commented Nov 19, 2025

Copy link
Copy Markdown
Member

(and also fix some general fuzzer regressions)

@squeek502

squeek502 commented Nov 20, 2025

Copy link
Copy Markdown
Member

Related to the Io.Writer changes: #25360

Related to the http changes: #24944 and #25785

Like ELF, we now have `std.debug.MachOFile` for the host-independent
parts, and `std.debug.SelfInfo.MachO` for logic requiring the file to
correspond to the running program.
This is relevant to PIEs, which are notably enabled by default on macOS.
The build system needs to only see virtual addresses, that is, those
which do not have the slide applied; but the fuzzer itself naturally
sees relocated addresses (i.e. with the slide applied). We just need to
subtract the slide when we communicate addresses to the build system.
The full file may not be written, either due to a previous chunk being
in-progress when `sendFile` was called, or due to `limit`.
@mlugg

mlugg commented Nov 20, 2025

Copy link
Copy Markdown
Member Author

Thanks @squeek502; I plan to merge these fixes as-is for now, but test coverage should probably be separately merged before the issues are closed. I am quite confident that my fixes here are correct.

@mlugg mlugg enabled auto-merge November 20, 2025 11:58
@mlugg mlugg merged commit 8a73fc8 into ziglang:master Nov 20, 2025
9 checks passed
@mlugg mlugg deleted the macos-fuzz-2 branch November 21, 2025 12:07
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.

2 participants