diff options
| author | Lee Cannon <leecannon@leecannon.xyz> | 2022-02-19 17:36:17 +0000 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-02-19 15:38:56 -0500 |
| commit | b0cdd3d0e691b20043bb7fb763f983b25bfcb2d2 (patch) | |
| tree | d45a74e4edeaf2dc5dd6e3e054e192d6d1ee3dbf /lib/std | |
| parent | 539bb8a2d7de08a9f7b63f136cb1ec8e5d88568a (diff) | |
| download | zig-b0cdd3d0e691b20043bb7fb763f983b25bfcb2d2.tar.gz zig-b0cdd3d0e691b20043bb7fb763f983b25bfcb2d2.zip | |
StackIterator should not try to check validity on freestanding
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/debug.zig | 3 |
1 files changed, 3 insertions, 0 deletions
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 |
