diff options
| author | Mitchell Hashimoto <m@mitchellh.com> | 2025-09-09 14:07:03 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-09 14:07:03 -0700 |
| commit | 0dc324607d289fcf5588fb9da4bd2c5459353974 (patch) | |
| tree | b0184864554ce6514a321953731a0ed85a6f530f | |
| parent | e7c1b4dd052cccf27f212cac5749e8144365a025 (diff) | |
| parent | be6cb0f6ce91d3e52cab44c5eaeb0a643f2a91f8 (diff) | |
terminal: fix test w/ freed config (#8576)
this test previously didn't fail when accessing freed members of config
because deiniting `command_arena` was a no-op; `command_arena` was
derived from `arena`, which allocated memory after `command_arena` was
created/used
| -rw-r--r-- | src/termio/Exec.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/termio/Exec.zig b/src/termio/Exec.zig index 5a15392b4..77fd2cc68 100644 --- a/src/termio/Exec.zig +++ b/src/termio/Exec.zig @@ -1698,7 +1698,7 @@ test "execCommand: direct command, config freed" { defer arena.deinit(); const alloc = arena.allocator(); - var command_arena = ArenaAllocator.init(alloc); + var command_arena = ArenaAllocator.init(testing.allocator); const command_alloc = command_arena.allocator(); const command = try (configpkg.Command{ .direct = &.{ |
