[nix-shell:~/dev/zig/build]$ rr record ./zig-out/bin/zig build-obj test2.zig rr: Saving execution to trace directory `/home/andy/.local/share/rr/zig-27'. error(gpa): memory address 0x7f71712ec300 leaked: /home/andy/dev/zig/lib/std/heap/arena_allocator.zig:71:106: 0x304a08 in std.heap.arena_allocator.ArenaAllocator.alloc (zig) var cur_node = if (self.state.buffer_list.first) |first_node| first_node else try self.createNode(0, n + ptr_align); ^ /home/andy/dev/zig/lib/std/mem/Allocator.zig:290:40: 0x796045 in std.mem.Allocator.allocAdvancedWithRetAddr (zig) const byte_slice = try self.allocFn(self, byte_count, a, len_align, return_address); ^ /home/andy/dev/zig/lib/std/mem/Allocator.zig:159:52: 0x6e2c64 in std.mem.Allocator.create (zig) const slice = try self.allocAdvancedWithRetAddr(T, null, 1, .exact, @returnAddress()); ^ /home/andy/dev/zig/src/Sema.zig:2882:51: 0x633a45 in Sema.funcCommon (zig) const new_func = try fn_arena.allocator.create(Module.Fn); ^ error(gpa): memory address 0x7f71712ec800 leaked: /home/andy/dev/zig/lib/std/heap/arena_allocator.zig:71:106: 0x304a08 in std.heap.arena_allocator.ArenaAllocator.alloc (zig) var cur_node = if (self.state.buffer_list.first) |first_node| first_node else try self.createNode(0, n + ptr_align); ^ /home/andy/dev/zig/lib/std/mem/Allocator.zig:290:40: 0x796045 in std.mem.Allocator.allocAdvancedWithRetAddr (zig) const byte_slice = try self.allocFn(self, byte_count, a, len_align, return_address); ^ /home/andy/dev/zig/lib/std/mem/Allocator.zig:159:52: 0x6e2c64 in std.mem.Allocator.create (zig) const slice = try self.allocAdvancedWithRetAddr(T, null, 1, .exact, @returnAddress()); ^ /home/andy/dev/zig/src/Sema.zig:2882:51: 0x633a45 in Sema.funcCommon (zig) const new_func = try fn_arena.allocator.create(Module.Fn); ^ error(gpa): memory address 0x7f71712ec900 leaked: /home/andy/dev/zig/lib/std/heap/arena_allocator.zig:71:106: 0x304a08 in std.heap.arena_allocator.ArenaAllocator.alloc (zig) var cur_node = if (self.state.buffer_list.first) |first_node| first_node else try self.createNode(0, n + ptr_align); ^ /home/andy/dev/zig/lib/std/mem/Allocator.zig:290:40: 0x796045 in std.mem.Allocator.allocAdvancedWithRetAddr (zig) const byte_slice = try self.allocFn(self, byte_count, a, len_align, return_address); ^ /home/andy/dev/zig/lib/std/mem/Allocator.zig:159:52: 0x6e2c64 in std.mem.Allocator.create (zig) const slice = try self.allocAdvancedWithRetAddr(T, null, 1, .exact, @returnAddress()); ^ /home/andy/dev/zig/src/Sema.zig:2882:51: 0x633a45 in Sema.funcCommon (zig) const new_func = try fn_arena.allocator.create(Module.Fn); ^ [nix-shell:~/dev/zig/build]$ rr replay GNU gdb (GDB) 9.2 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /home/andy/.local/share/rr/zig-27/mmap_hardlink_3_zig... Really redefine built-in command "restart"? (y or n) [answered Y; input not from terminal] Remote debugging using 127.0.0.1:18294 std.start._start () at /home/andy/dev/zig/lib/std/start.zig:172 172 argc_argv_ptr = asm volatile ( (rr) continue Continuing. error(gpa): memory address 0x7f71712ec300 leaked: /home/andy/dev/zig/lib/std/heap/arena_allocator.zig:71:106: 0x304a08 in std.heap.arena_allocator.ArenaAllocator.alloc (zig) var cur_node = if (self.state.buffer_list.first) |first_node| first_node else try self.createNode(0, n + ptr_align); ^ /home/andy/dev/zig/lib/std/mem/Allocator.zig:290:40: 0x796045 in std.mem.Allocator.allocAdvancedWithRetAddr (zig) const byte_slice = try self.allocFn(self, byte_count, a, len_align, return_address); ^ /home/andy/dev/zig/lib/std/mem/Allocator.zig:159:52: 0x6e2c64 in std.mem.Allocator.create (zig) const slice = try self.allocAdvancedWithRetAddr(T, null, 1, .exact, @returnAddress()); ^ /home/andy/dev/zig/src/Sema.zig:2882:51: 0x633a45 in Sema.funcCommon (zig) const new_func = try fn_arena.allocator.create(Module.Fn); ^ error(gpa): memory address 0x7f71712ec800 leaked: /home/andy/dev/zig/lib/std/heap/arena_allocator.zig:71:106: 0x304a08 in std.heap.arena_allocator.ArenaAllocator.alloc (zig) var cur_node = if (self.state.buffer_list.first) |first_node| first_node else try self.createNode(0, n + ptr_align); ^ /home/andy/dev/zig/lib/std/mem/Allocator.zig:290:40: 0x796045 in std.mem.Allocator.allocAdvancedWithRetAddr (zig) const byte_slice = try self.allocFn(self, byte_count, a, len_align, return_address); ^ /home/andy/dev/zig/lib/std/mem/Allocator.zig:159:52: 0x6e2c64 in std.mem.Allocator.create (zig) const slice = try self.allocAdvancedWithRetAddr(T, null, 1, .exact, @returnAddress()); ^ /home/andy/dev/zig/src/Sema.zig:2882:51: 0x633a45 in Sema.funcCommon (zig) const new_func = try fn_arena.allocator.create(Module.Fn); ^ error(gpa): memory address 0x7f71712ec900 leaked: /home/andy/dev/zig/lib/std/heap/arena_allocator.zig:71:106: 0x304a08 in std.heap.arena_allocator.ArenaAllocator.alloc (zig) var cur_node = if (self.state.buffer_list.first) |first_node| first_node else try self.createNode(0, n + ptr_align); ^ /home/andy/dev/zig/lib/std/mem/Allocator.zig:290:40: 0x796045 in std.mem.Allocator.allocAdvancedWithRetAddr (zig) const byte_slice = try self.allocFn(self, byte_count, a, len_align, return_address); ^ /home/andy/dev/zig/lib/std/mem/Allocator.zig:159:52: 0x6e2c64 in std.mem.Allocator.create (zig) const slice = try self.allocAdvancedWithRetAddr(T, null, 1, .exact, @returnAddress()); ^ /home/andy/dev/zig/src/Sema.zig:2882:51: 0x633a45 in Sema.funcCommon (zig) const new_func = try fn_arena.allocator.create(Module.Fn); ^ Program received signal SIGKILL, Killed. 0x00000000002fa45a in std.os.linux.x86_64.syscall1 (number=exit_group, arg1=0) at /home/andy/dev/zig/lib/std/os/linux/x86_64.zig:17 17 return asm volatile ("syscall" (rr) watch *0x7f71712ec300 Hardware watchpoint 1: *0x7f71712ec300 (rr) reverse-cont Continuing. [New Thread 18285.18286] Thread 1 hit Hardware watchpoint 1: *0x7f71712ec300 Old value = 0 New value = -1431655766 std.heap.arena_allocator.ArenaAllocator.createNode (self=0x7ffd83533400, prev_len=0, minimum_size=56) at /home/andy/dev/zig/lib/std/heap/arena_allocator.zig:61 61 .next = null, (rr) bt #0 std.heap.arena_allocator.ArenaAllocator.createNode (self=0x7ffd83533400, prev_len=0, minimum_size=56) at /home/andy/dev/zig/lib/std/heap/arena_allocator.zig:61 #1 0x0000000000304a09 in std.heap.arena_allocator.ArenaAllocator.alloc (allocator=0x7ffd83533400, n=48, ptr_align=8, len_align=0, ra=6502982) at /home/andy/dev/zig/lib/std/heap/arena_allocator.zig:71 #2 0x0000000000796046 in std.mem.Allocator.allocAdvancedWithRetAddr (self=0x7ffd83533400, n=1, exact=exact, return_address=6502982) at /home/andy/dev/zig/lib/std/mem/Allocator.zig:290 #3 0x00000000006e2c65 in std.mem.Allocator.create (self=0x7ffd83533400) at /home/andy/dev/zig/lib/std/mem/Allocator.zig:159 #4 0x0000000000633a46 in Sema.funcCommon (sema=0x7ffd83535800, block=0x7ffd83535748, src_node_offset=2, zir_param_types=..., body_inst=8, zir_return_type=noreturn_type, cc=Unspecified, align_val=..., var_args=false, inferred_error_set=false, src_locs=...) at Sema.zig:2882 #5 0x0000000000572555 in Sema.zirFunc (sema=0x7ffd83535800, block=0x7ffd83535748, inst=8, inferred_error_set=false) at Sema.zig:2799 #6 0x00000000004a7056 in Sema.analyzeBody (sema=0x7ffd83535800, block=0x7ffd83535748, body=...) at Sema.zig:212 #7 0x00000000004f8a09 in Module.semaDecl (mod=0x7f716f0c8570, decl=0x7f71712e4000) at Module.zig:3448 #8 0x00000000003f6d64 in Module.ensureDeclAnalyzed (mod=0x7f716f0c8570, decl=0x7f71712e4000) at Module.zig:3271 #9 0x00000000003ecc2f in Compilation.performAllTheWork (self=0x7f716f0c8018) at Compilation.zig:1999 #10 0x00000000003e709e in Compilation.update (self=0x7f716f0c8018) at Compilation.zig:1613 #11 0x000000000037f1d3 in updateModule (gpa=0x8dd418 , comp=0x7f716f0c8018, hook=) at main.zig:2110 #12 0x000000000031e713 in buildOutputType (gpa=0x8dd418 , arena=0x7ffd8353bf90, all_args=..., arg_mode=...) at main.zig:1951 #13 0x0000000000309684 in mainArgs (gpa=0x8dd418 , arena=0x7ffd8353bf90, args=...) at main.zig:187 #14 0x0000000000301c71 in main () at main.zig:138 (rr) up #1 0x0000000000304a09 in std.heap.arena_allocator.ArenaAllocator.alloc (allocator=0x7ffd83533400, n=48, ptr_align=8, len_align=0, ra=6502982) at /home/andy/dev/zig/lib/std/heap/arena_allocator.zig:71 71 var cur_node = if (self.state.buffer_list.first) |first_node| first_node else try self.createNode(0, n + ptr_align); (rr) #2 0x0000000000796046 in std.mem.Allocator.allocAdvancedWithRetAddr (self=0x7ffd83533400, n=1, exact=exact, return_address=6502982) at /home/andy/dev/zig/lib/std/mem/Allocator.zig:290 290 const byte_slice = try self.allocFn(self, byte_count, a, len_align, return_address); (rr) #3 0x00000000006e2c65 in std.mem.Allocator.create (self=0x7ffd83533400) at /home/andy/dev/zig/lib/std/mem/Allocator.zig:159 159 const slice = try self.allocAdvancedWithRetAddr(T, null, 1, .exact, @returnAddress()); (rr) #4 0x0000000000633a46 in Sema.funcCommon (sema=0x7ffd83535800, block=0x7ffd83535748, src_node_offset=2, zir_param_types=..., body_inst=8, zir_return_type=noreturn_type, cc=Unspecified, align_val=..., var_args=false, inferred_error_set=false, src_locs=...) at Sema.zig:2882 2882 const new_func = try fn_arena.allocator.create(Module.Fn); (rr) p sema.owner_decl.name $1 = (u8 *) 0x7f716f0b888d "_start" (rr)