mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
std.debug: fix an invalid read in StackIterator.next()
We're overwriting the memory that unwind_context sits in, so we need to do the getFp() call earlier.
This commit is contained in:
parent
a36dab2f90
commit
62a8cfd5fe
1 changed files with 2 additions and 1 deletions
|
|
@ -925,7 +925,8 @@ const StackIterator = union(enum) {
|
|||
const di_gpa = getDebugInfoAllocator();
|
||||
const ret_addr = di.unwindFrame(di_gpa, unwind_context) catch |err| {
|
||||
const pc = unwind_context.pc;
|
||||
it.* = .{ .fp = unwind_context.getFp() };
|
||||
const fp = unwind_context.getFp();
|
||||
it.* = .{ .fp = fp };
|
||||
return .{ .switch_to_fp = .{
|
||||
.address = pc,
|
||||
.err = err,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue