diff --git a/lib/std/debug.zig b/lib/std/debug.zig index c1571a70c6d4ca235535950063a446e9be07a81e..a2cbf88730c9e4aab7727d44ea1ca99c01a7de46 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