Skip to content

compiler segfault #16874

@dweiller

Description

@dweiller

Zig Version

0.11.0 and 0.12.0-dev.125+7ef1eb1c2

Steps to Reproduce and Observed Behavior

Clone https://github.com/dweiller/zubench (commit 83cbcff) and run zig build run. More minimally, run either of

zig test examples/fib.zig --test-runner src/bench_runner.zig --mod zubench::src/bench.zig --deps zubench
zig build-exe src/bench_runner.zig --mod @bench:zubench:examples/fib_build.zig --mod zubench::src/bench.zig --deps @bench,zubench

Expected Behavior

With zig build run there should be no error, with the zig test line above there should be a failing test (the failing one is removed with --test-filter fib); the build-exe should compile without issue.

I intend to update this issue after attempting to bisect the zig compiler to work out exactly when this segfault was introduced I have bisected the issue - details below.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions