Skip to content

Commit 5efee57

Browse files
fuzzer: less basic
1 parent 29840b5 commit 5efee57

11 files changed

+1402
-460
lines changed

lib/compiler/test_runner.zig

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,10 @@ const FuzzerSlice = extern struct {
341341

342342
var is_fuzz_test: bool = undefined;
343343

344-
extern fn fuzzer_start(testOne: *const fn ([*]const u8, usize) callconv(.C) void) void;
344+
extern fn fuzzer_start(
345+
testOne: *const fn ([*]const u8, usize) callconv(.C) void,
346+
options: *const std.testing.FuzzInputOptions,
347+
) void;
345348
extern fn fuzzer_init(cache_dir: FuzzerSlice) void;
346349
extern fn fuzzer_coverage_id() u64;
347350

@@ -395,7 +398,7 @@ pub fn fuzz(
395398
if (builtin.fuzz) {
396399
const prev_allocator_state = testing.allocator_instance;
397400
testing.allocator_instance = .{};
398-
fuzzer_start(&global.fuzzer_one);
401+
fuzzer_start(&global.fuzzer_one, &options);
399402
testing.allocator_instance = prev_allocator_state;
400403
return;
401404
}

0 commit comments

Comments
 (0)