Skip to content

fuzz testing: support Windows #20987

Open
@andrewrk

Description

@andrewrk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.enhancementSolving this issue will likely involve adding new logic or components to the codebase.fuzzingos-windows

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions