Commit 3ccfd58bb6

Andrew Kelley <andrew@ziglang.org>
2020-08-11 23:04:08
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.
1 parent 6febe7e
Changed files (1)
lib
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);