File tree 1 file changed +7
-11
lines changed
1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -11,20 +11,16 @@ const mem = std.mem;
11
11
// std.debug.assert(toggle_me == false);
12
12
// }
13
13
14
- var gpa_impl : std .heap .GeneralPurposeAllocator (.{}) = .{};
15
- var arena_impl : std.heap.ArenaAllocator = .{
16
- .child_allocator = undefined ,
17
- .state = .{},
18
- };
19
-
20
- export fn zig_fuzz_init () void {
21
- const gpa = gpa_impl .allocator ();
22
- arena_impl .child_allocator = gpa ;
23
- }
14
+ export fn zig_fuzz_init () void {}
24
15
25
16
export fn zig_fuzz_test (buf : [* ]u8 , len : isize ) void {
17
+ var gpa_impl : std .heap .GeneralPurposeAllocator (.{}) = .{};
18
+ defer std .debug .assert (gpa_impl .deinit () == .ok );
19
+
20
+ var arena_impl = std .heap .ArenaAllocator .init (gpa_impl .allocator ());
21
+ defer arena_impl .deinit ();
22
+
26
23
const arena = arena_impl .allocator ();
27
- _ = arena_impl .reset (.retain_capacity );
28
24
29
25
const src = buf [0.. @intCast (len )];
30
26
var t = ctx ;
You can’t perform that action at this time.
0 commit comments