mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +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
@ -925,7 +925,8 @@ const StackIterator = union(enum) {
|
|||||||
const di_gpa = getDebugInfoAllocator();
|
const di_gpa = getDebugInfoAllocator();
|
||||||
const ret_addr = di.unwindFrame(di_gpa, unwind_context) catch |err| {
|
const ret_addr = di.unwindFrame(di_gpa, unwind_context) catch |err| {
|
||||||
const pc = unwind_context.pc;
|
const pc = unwind_context.pc;
|
||||||
it.* = .{ .fp = unwind_context.getFp() };
|
const fp = unwind_context.getFp();
|
||||||
|
it.* = .{ .fp = fp };
|
||||||
return .{ .switch_to_fp = .{
|
return .{ .switch_to_fp = .{
|
||||||
.address = pc,
|
.address = pc,
|
||||||
.err = err,
|
.err = err,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user