From ff8e7597056aebc67213fff0b4942a66d0a4e1dd Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 6 Feb 2025 14:46:16 -0800 Subject: [PATCH] std.testing: don't ask wasm to stack trace --- lib/std/testing.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/testing.zig b/lib/std/testing.zig index 616a138cbd..288c6cdc89 100644 --- a/lib/std/testing.zig +++ b/lib/std/testing.zig @@ -17,7 +17,7 @@ var base_allocator_instance = std.heap.FixedBufferAllocator.init(""); /// This should only be used in temporary test programs. pub const allocator = allocator_instance.allocator(); pub var allocator_instance: std.heap.GeneralPurposeAllocator(.{ - .stack_trace_frames = 10, + .stack_trace_frames = if (std.debug.sys_can_stack_trace) 10 else 0, .resize_stack_traces = true, // A unique value so that when a default-constructed // GeneralPurposeAllocator is incorrectly passed to testing allocator, or