From b0cdd3d0e691b20043bb7fb763f983b25bfcb2d2 Mon Sep 17 00:00:00 2001 From: Lee Cannon Date: Sat, 19 Feb 2022 17:36:17 +0000 Subject: [PATCH] StackIterator should not try to check validity on freestanding --- lib/std/debug.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/std/debug.zig b/lib/std/debug.zig index c1571a70c6..a2cbf88730 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -425,6 +425,9 @@ 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; + const aligned_address = address & ~@intCast(usize, (mem.page_size - 1)); // If the address does not span 2 pages, query only the first one