std.debug: Fix a bitness portability issue in walkStackWindows().

This commit is contained in:
Alex Rønne Petersen 2024-08-21 15:49:09 +02:00
parent d702a21bbc
commit 34c6482403
No known key found for this signature in database

View File

@ -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) {
@ -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));
}