authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-08-21 15:49:09+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-08-28 03:13:01+02:00
log34c64824038d829dfad200a66a20ee74cbe5c141
treee19f9413006330a100561a58da6a911b72bdbfd7
parentd702a21bbcef254f32a1c40498eb81c42c249f28
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

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


1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/debug.zig+2-2
...@@ -789,7 +789,7 @@ pub noinline fn walkStackWindows(addresses: []usize, existing_context: ?*const w...@@ -789,7 +789,7 @@ pub noinline fn walkStackWindows(addresses: []usize, existing_context: ?*const w
789 }789 }
790790
791 var i: usize = 0;791 var i: usize = 0;
792 var image_base: usize = undefined;792 var image_base: windows.DWORD64 = undefined;
793 var history_table: windows.UNWIND_HISTORY_TABLE = std.mem.zeroes(windows.UNWIND_HISTORY_TABLE);793 var history_table: windows.UNWIND_HISTORY_TABLE = std.mem.zeroes(windows.UNWIND_HISTORY_TABLE);
794794
795 while (i < addresses.len) : (i += 1) {795 while (i < addresses.len) : (i += 1) {
...@@ -809,7 +809,7 @@ pub noinline fn walkStackWindows(addresses: []usize, existing_context: ?*const w...@@ -809,7 +809,7 @@ pub noinline fn walkStackWindows(addresses: []usize, existing_context: ?*const w
809 );809 );
810 } else {810 } else {
811 // leaf function811 // leaf function
812 context.setIp(@as(*u64, @ptrFromInt(current_regs.sp)).*);812 context.setIp(@as(*usize, @ptrFromInt(current_regs.sp)).*);
813 context.setSp(current_regs.sp + @sizeOf(usize));813 context.setSp(current_regs.sp + @sizeOf(usize));
814 }814 }
815815