diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-08-11 14:04:08 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-08-11 14:04:08 -0700 |
| commit | 3ccfd58bb6765bcb6c586e91fd638a8117b4634f (patch) | |
| tree | 164b9628fb876f43bad2812ea74388609e6b31ce /lib | |
| parent | 6febe7e977072fea1bf7b6003be2d6c1f3654905 (diff) | |
| download | zig-3ccfd58bb6765bcb6c586e91fd638a8117b4634f.tar.gz zig-3ccfd58bb6765bcb6c586e91fd638a8117b4634f.zip | |
std.mem.Allocator: fix not passing return_address
This makes collected stack traces omit less useful frames. For user
applications which only store a fixed number of stack frames this can
make a big difference.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/std/mem/Allocator.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/mem/Allocator.zig b/lib/std/mem/Allocator.zig index 8bdab81bc6..e73050165e 100644 --- a/lib/std/mem/Allocator.zig +++ b/lib/std/mem/Allocator.zig @@ -369,7 +369,7 @@ pub fn reallocAdvancedWithRetAddr( const Slice = @typeInfo(@TypeOf(old_mem)).Pointer; const T = Slice.child; if (old_mem.len == 0) { - return self.allocAdvanced(T, new_alignment, new_n, exact); + return self.allocAdvancedWithRetAddr(T, new_alignment, new_n, exact, return_address); } if (new_n == 0) { self.free(old_mem); |
