zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 3ccfd58bb6765bcb6c586e91fd638a8117b4634f (tree)
parent 6febe7e977072fea1bf7b6003be2d6c1f3654905
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Tue, 11 Aug 2020 14:04:08 -0700

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:
Mlib/std/mem/Allocator.zig | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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);