| author | |
| committer | |
| log | 5e5b328dacb23e0804f05e0e1228f1671001d7ff |
| tree | ee45647a875c83d1ac68fd7087f032197cdb9cfd |
| parent | 1ddae8585a00e5c6d283336b7421caf480611123 |
4 files changed, 5 insertions(+), 4 deletions(-)
test/standalone/windows_argv/build.zig+1-1| ... | ... | @@ -52,7 +52,7 @@ pub fn build(b: *std.Build) !void { |
| 52 | 52 | |
| 53 | 53 | const fuzz_seed = b.option(u64, "seed", "Seed to use for the PRNG (default: random)") orelse seed: { |
| 54 | 54 | var buf: [8]u8 = undefined; |
| 55 | try std.posix.getrandom(&buf); | |
| 55 | b.graph.io.random(&buf); | |
| 56 | 56 | break :seed std.mem.readInt(u64, &buf, builtin.cpu.arch.endian()); |
| 57 | 57 | }; |
| 58 | 58 | const fuzz_seed_arg = std.fmt.allocPrint(b.allocator, "{}", .{fuzz_seed}) catch @panic("oom"); |
test/standalone/windows_argv/fuzz.zig+2-1| ... | ... | @@ -5,6 +5,7 @@ const Allocator = std.mem.Allocator; |
| 5 | 5 | |
| 6 | 6 | pub fn main(init: std.process.Init) !void { |
| 7 | 7 | const gpa = init.gpa; |
| 8 | const io = init.io; | |
| 8 | 9 | const args = try init.minimal.args.toSlice(init.arena.allocator()); |
| 9 | 10 | |
| 10 | 11 | if (args.len < 2) return error.MissingArgs; |
| ... | ... | @@ -23,7 +24,7 @@ pub fn main(init: std.process.Init) !void { |
| 23 | 24 | if (args.len < 4) { |
| 24 | 25 | rand_seed = true; |
| 25 | 26 | var buf: [8]u8 = undefined; |
| 26 | try std.posix.getrandom(&buf); | |
| 27 | io.random(&buf); | |
| 27 | 28 | break :seed std.mem.readInt(u64, &buf, builtin.cpu.arch.endian()); |
| 28 | 29 | } |
| 29 | 30 | break :seed try std.fmt.parseUnsigned(u64, args[3], 10); |
test/standalone/windows_bat_args/build.zig+1-1| ... | ... | @@ -65,7 +65,7 @@ pub fn build(b: *std.Build) !void { |
| 65 | 65 | |
| 66 | 66 | const fuzz_seed = b.option(u64, "seed", "Seed to use for the PRNG (default: random)") orelse seed: { |
| 67 | 67 | var buf: [8]u8 = undefined; |
| 68 | try std.posix.getrandom(&buf); | |
| 68 | b.graph.io.random(&buf); | |
| 69 | 69 | break :seed std.mem.readInt(u64, &buf, builtin.cpu.arch.endian()); |
| 70 | 70 | }; |
| 71 | 71 | const fuzz_seed_arg = std.fmt.allocPrint(b.allocator, "{}", .{fuzz_seed}) catch @panic("oom"); |
test/standalone/windows_bat_args/fuzz.zig+1-1| ... | ... | @@ -22,7 +22,7 @@ pub fn main(init: std.process.Init) !void { |
| 22 | 22 | const seed_arg = it.next() orelse { |
| 23 | 23 | rand_seed = true; |
| 24 | 24 | var buf: [8]u8 = undefined; |
| 25 | try std.posix.getrandom(&buf); | |
| 25 | io.random(&buf); | |
| 26 | 26 | break :seed std.mem.readInt(u64, &buf, builtin.cpu.arch.endian()); |
| 27 | 27 | }; |
| 28 | 28 | break :seed try std.fmt.parseUnsigned(u64, seed_arg, 10); |