Skip to content

Zig fails to compile zig init-exe program on linux-aarch64 #16331

@robbielyman

Description

@robbielyman

Zig Version

0.11.0-dev.3937+78eb3c561

Steps to Reproduce and Observed Behavior

downloaded the latest zig, created a new project with zig init-exe and ran zig build run.
I get the following error:

thread 26466 panic: reached unreachable code
/home/rylee/src/zig/lib/std/os.zig:4444:19: 0x33b857 in msync (build)
        .INVAL => unreachable, // Invalid parameters.
                  ^
/home/rylee/src/zig/lib/std/debug.zig:468:25: 0x320267 in isValidMemory (build)
                os.msync(aligned_memory, os.MSF.ASYNC) catch |err| {
                        ^
/home/rylee/src/zig/lib/std/debug.zig:511:77: 0x30896f in next_internal (build)
        if (fp == 0 or !mem.isAligned(fp, @alignOf(usize)) or !isValidMemory(fp))
                                                                            ^
/home/rylee/src/zig/lib/std/debug.zig:451:45: 0x2e8687 in next (build)
                address = self.next_internal() orelse return null;
                                            ^
/home/rylee/src/zig/lib/std/debug.zig:211:29: 0x2b4373 in captureStackTrace (build)
            addr.* = it.next() orelse {
                            ^
/home/rylee/src/zig/lib/std/Build/Step.zig:149:32: 0x29b82f in init (build)
    std.debug.captureStackTrace(first_ret_addr, &stack_trace);
                               ^
Panicked during a panic. Aborting.
error: the following build command crashed:
/home/rylee/src/ziggity/zig-cache/o/222e27c74b2c6353e1106ce58173b797/build /home/rylee/src/zig/zig /home/rylee/src/ziggity /home/rylee/src/ziggity/zig-cache /home/rylee/.cache/zig run

Expected Behavior

zig build run should work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions