authorgravatar for leecannon@leecannon.xyzLee Cannon <leecannon@leecannon.xyz> 2022-02-19 17:36:17+00:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-02-19 15:38:56-05:00
logb0cdd3d0e691b20043bb7fb763f983b25bfcb2d2
treed45a74e4edeaf2dc5dd6e3e054e192d6d1ee3dbf
parent539bb8a2d7de08a9f7b63f136cb1ec8e5d88568a

StackIterator should not try to check validity on freestanding


1 files changed, 3 insertions(+), 0 deletions(-)

lib/std/debug.zig+3
...@@ -425,6 +425,9 @@ pub const StackIterator = struct {...@@ -425,6 +425,9 @@ pub const StackIterator = struct {
425 }425 }
426426
427 fn isValidMemory(address: usize) bool {427 fn isValidMemory(address: usize) bool {
428 // We are unable to determine validity of memory for freestanding targets
429 if (native_os == .freestanding) return true;
430
428 const aligned_address = address & ~@intCast(usize, (mem.page_size - 1));431 const aligned_address = address & ~@intCast(usize, (mem.page_size - 1));
429432
430 // If the address does not span 2 pages, query only the first one433 // If the address does not span 2 pages, query only the first one