diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-11-27 01:07:35 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-11-29 23:30:38 -0700 |
| commit | ceb0a632cfd6a4eada6bd27bf6a3754e95dcac86 (patch) | |
| tree | 3c174281ab0b9d51b6c78234b0648e197412eea8 /lib/std/debug.zig | |
| parent | deda6b514691c3a7ffc7931469886d0e7be2f67e (diff) | |
| download | zig-ceb0a632cfd6a4eada6bd27bf6a3754e95dcac86.tar.gz zig-ceb0a632cfd6a4eada6bd27bf6a3754e95dcac86.zip | |
std.mem.Allocator: allow shrink to fail
closes #13535
Diffstat (limited to 'lib/std/debug.zig')
| -rw-r--r-- | lib/std/debug.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig index 75e8426e2c..90ceff3df1 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -1112,7 +1112,7 @@ fn readMachODebugInfo(allocator: mem.Allocator, macho_file: File) !ModuleDebugIn } assert(state == .oso_close); - const symbols = allocator.shrink(symbols_buf, symbol_index); + const symbols = try allocator.realloc(symbols_buf, symbol_index); // Even though lld emits symbols in ascending order, this debug code // should work for programs linked in any valid way. |
