Skip to content

Commit edb7e48

Browse files
committed
Tweak windows.UNWIND_HISTORY_TABLE for mem.zeroes compatibility
`mem.zeroes` was not compatible with the structure because it contained non-nullable pointers. Those pointers have been made nullable. `history_table` is also now initialized to undefined. It is an output parameter of `windows.ntdll.RtlLookupFunctionEntry` and never read afterward, so there should be no functional change.
1 parent 937e8cb commit edb7e48

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/std/debug.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ pub noinline fn walkStackWindows(addresses: []usize, existing_context: ?*const w
764764

765765
var i: usize = 0;
766766
var image_base: usize = undefined;
767-
var history_table: windows.UNWIND_HISTORY_TABLE = std.mem.zeroes(windows.UNWIND_HISTORY_TABLE);
767+
var history_table: windows.UNWIND_HISTORY_TABLE = undefined;
768768

769769
while (i < addresses.len) : (i += 1) {
770770
const current_regs = context.getRegs();

lib/std/os/windows.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4104,7 +4104,7 @@ pub const EXCEPTION_ROUTINE = *const fn (
41044104
pub const UNWIND_HISTORY_TABLE_SIZE = 12;
41054105
pub const UNWIND_HISTORY_TABLE_ENTRY = extern struct {
41064106
ImageBase: ULONG64,
4107-
FunctionEntry: *Self.RUNTIME_FUNCTION,
4107+
FunctionEntry: ?*Self.RUNTIME_FUNCTION,
41084108
};
41094109

41104110
pub const UNWIND_HISTORY_TABLE = extern struct {

0 commit comments

Comments
 (0)