aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2024-08-21 15:49:09 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2024-08-28 03:13:01 +0200
commit34c64824038d829dfad200a66a20ee74cbe5c141 (patch)
treee19f9413006330a100561a58da6a911b72bdbfd7 /lib/std
parentd702a21bbcef254f32a1c40498eb81c42c249f28 (diff)
downloadzig-34c64824038d829dfad200a66a20ee74cbe5c141.tar.gz
zig-34c64824038d829dfad200a66a20ee74cbe5c141.zip
std.debug: Fix a bitness portability issue in walkStackWindows().
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/debug.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
index 4672f7ac06..ac02fbc6b8 100644
--- a/lib/std/debug.zig
+++ b/lib/std/debug.zig
@@ -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));
}