Should I be getting a stack trace on stack overflow?

This code doesn’t give me a stack trace:

const std = @import("std");
pub fn main() void {
    var arr: [50_000_000]u8 = @splat(0xaa);
    std.debug.print("{x}", .{arr[arr.len - 3 .. arr.len]});
}

ran using anyzig:

zig 0.15.1 run test.zig 
anyzig: appdata '/home/jeff/.local/share/anyzig'
anyzig: zig '0.15.1' already exists at '/home/jeff/.cache/zig/p/N-V-__8AAN5NhBR0oTsvnwjPdeNiiDLtEsfXRHd1fv-R3TOv'
Segmentation fault

Is this normal?

Congratulations, four digit issue: in debug builds, detect stack overflow at runtime and output a partial stack trace · Issue #1616 · ziglang/zig · GitHub

2 Likes