Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
const print = @import("std").debug.print;
const DirEntry = extern struct {
name: [8] u8,
ext: [3] u8,
};
pub fn main() !void {
var data_buffer: [512]u8 align(2)= undefined;
const dir_entry_list: []DirEntry = &data_buffer;
print("dir entry: {s}", .{dir_entry_list[0].name});
}
Build or run
zig build-exe scratchpad.zig
Compiler crashes:
fish: Job 1, 'zig build-exe scratchpad.zig' terminated by signal SIGSEGV (Address boundary error)
Expected Behavior
Program builds or compiler throws some error.
Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
Build or run
zig build-exe scratchpad.zigCompiler crashes:
fish: Job 1, 'zig build-exe scratchpad.zig' terminated by signal SIGSEGV (Address boundary error)Expected Behavior
Program builds or compiler throws some error.