Skip to content

Commit ff8e759

Browse files
committed
std.testing: don't ask wasm to stack trace
1 parent d0e1a6a commit ff8e759

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/testing.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var base_allocator_instance = std.heap.FixedBufferAllocator.init("");
1717
/// This should only be used in temporary test programs.
1818
pub const allocator = allocator_instance.allocator();
1919
pub var allocator_instance: std.heap.GeneralPurposeAllocator(.{
20-
.stack_trace_frames = 10,
20+
.stack_trace_frames = if (std.debug.sys_can_stack_trace) 10 else 0,
2121
.resize_stack_traces = true,
2222
// A unique value so that when a default-constructed
2323
// GeneralPurposeAllocator is incorrectly passed to testing allocator, or

0 commit comments

Comments
 (0)