From 786876c05efc55ecc9c9c05e89f754f813860436 Mon Sep 17 00:00:00 2001 From: leap123 Date: Thu, 11 Apr 2024 10:25:49 +0700 Subject: [PATCH] Fix stack iterator on UEFI Don't know why UEFI wasn't excluded but freestanding is, probably an oversight since I want to have detailed debug info on my panic function on my Headstart bootloader. --- lib/std/debug.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/debug.zig b/lib/std/debug.zig index d1d6201b80..f54856c05b 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -661,7 +661,7 @@ pub const StackIterator = struct { fn isValidMemory(address: usize) bool { // We are unable to determine validity of memory for freestanding targets - if (native_os == .freestanding) return true; + if (native_os == .freestanding or native_os == .uefi) return true; const aligned_address = address & ~@as(usize, @intCast((mem.page_size - 1))); if (aligned_address == 0) return false;