Skip to content

fuzz testing: support Windows #20987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
andrewrk opened this issue Aug 8, 2024 · 0 comments
Open

fuzz testing: support Windows #20987

andrewrk opened this issue Aug 8, 2024 · 0 comments
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. fuzzing os-windows
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented Aug 8, 2024

Extracted from #20958.

zig build --fuzz does not work on Windows yet:

switch (builtin.os.tag) {
// Current implementation depends on two things that need to be ported to Windows:
// * Memory-mapping to share data between the fuzzer and build runner.
// * COFF/PE support added to `std.debug.Info` (it needs a batching API for resolving
// many addresses to source locations).
.windows => fatal("--fuzz not yet implemented for {s}", .{@tagName(builtin.os.tag)}),
else => {},
}
const listen_address = std.net.Address.parseIp("127.0.0.1", listen_port) catch unreachable;
try Fuzz.start(

As noted in that comment, the current implementation depends on two things that need to be ported to Windows:

  • Memory-mapping to share data between the fuzzer and build runner.
  • COFF/PE support added to std.debug.Info (it needs a batching API for resolving many addresses to source locations).

To reproduce:

zig init
zig build test --fuzz
@andrewrk andrewrk added enhancement Solving this issue will likely involve adding new logic or components to the codebase. contributor friendly This issue is limited in scope and/or knowledge of Zig internals. os-windows fuzzing labels Aug 8, 2024
@andrewrk andrewrk added this to the 0.14.0 milestone Aug 8, 2024
gcoakes added a commit to gcoakes/zig that referenced this issue Aug 15, 2024
This resolves one aspect of ziglang#20987 by changing the existing
use of `std.posix.mmap` to use the newly added `std.fs.MemoryMap`.
gcoakes added a commit to gcoakes/zig that referenced this issue Aug 15, 2024
This resolves one aspect of ziglang#20987 by changing the existing
use of `std.posix.mmap` to use the newly added `std.fs.MemoryMap`.
gcoakes added a commit to gcoakes/zig that referenced this issue Aug 15, 2024
This resolves one aspect of ziglang#20987 by changing the existing
use of `std.posix.mmap` to use the newly added `std.fs.MemoryMap`.
gcoakes added a commit to gcoakes/zig that referenced this issue Aug 18, 2024
This resolves one aspect of ziglang#20987 by changing the existing
use of `std.posix.mmap` to use the newly added `std.fs.MemoryMap`.
gcoakes added a commit to gcoakes/zig that referenced this issue Aug 18, 2024
This resolves one aspect of ziglang#20987 by changing the existing
use of `std.posix.mmap` to use the newly added `std.fs.MemoryMap`.
gcoakes added a commit to gcoakes/zig that referenced this issue Aug 18, 2024
This resolves one aspect of ziglang#20987 by changing the existing
use of `std.posix.mmap` to use the newly added `std.fs.MemoryMap`.
gcoakes added a commit to gcoakes/zig that referenced this issue Aug 18, 2024
This resolves one aspect of ziglang#20987 by changing the existing
use of `std.posix.mmap` to use the newly added `std.fs.MemoryMap`.
gcoakes added a commit to gcoakes/zig that referenced this issue Aug 18, 2024
This resolves one aspect of ziglang#20987 by changing the existing
use of `std.posix.mmap` to use the newly added `std.fs.MemoryMap`.
gcoakes added a commit to gcoakes/zig that referenced this issue Aug 18, 2024
This resolves one aspect of ziglang#20987 by changing the existing
use of `std.posix.mmap` to use the newly added `std.fs.MemoryMap`.
@andrewrk andrewrk modified the milestones: 0.14.0, 0.15.0 Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. fuzzing os-windows
Projects
None yet
Development

No branches or pull requests

1 participant