Skip to content

Commit

Permalink
std.debug: Fix a bitness portability issue in walkStackWindows().
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrp committed Aug 28, 2024
1 parent d702a21 commit 34c6482
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/std/debug.zig
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ pub noinline fn walkStackWindows(addresses: []usize, existing_context: ?*const w
}

var i: usize = 0;
var image_base: usize = undefined;
var image_base: windows.DWORD64 = undefined;
var history_table: windows.UNWIND_HISTORY_TABLE = std.mem.zeroes(windows.UNWIND_HISTORY_TABLE);

while (i < addresses.len) : (i += 1) {
Expand All @@ -809,7 +809,7 @@ pub noinline fn walkStackWindows(addresses: []usize, existing_context: ?*const w
);
} else {
// leaf function
context.setIp(@as(*u64, @ptrFromInt(current_regs.sp)).*);
context.setIp(@as(*usize, @ptrFromInt(current_regs.sp)).*);
context.setSp(current_regs.sp + @sizeOf(usize));
}

Expand Down

0 comments on commit 34c6482

Please sign in to comment.