Skip to content

Segfault when using invalid directory with zig test --zig-lib-dir #22122

@jeffective

Description

@jeffective

Zig Version

0.14.0-dev.2362+a47aa9dd9

Steps to Reproduce and Observed Behavior

$ zig version
0.14.0-dev.2362+a47aa9dd9
$ mkdir segfault
$ cd segfault/
$ zig init
info: created build.zig
info: created build.zig.zon
info: created src/main.zig
info: created src/root.zig
info: see `zig build --help` for a menu of options
$ zig build
$ zig test --zig-lib-dir src src/root.zig 
Segmentation fault

I think it has something to do with the presence of the zig build cache, I can't get a reproduction without the presence of a built project.

Expected Behavior

Compiler should not segfault and report error regarding invalid zig lib directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions