Zig Version
zig-x86_64-linux-0.16.0-dev.2623+27eec9bd6
Steps to Reproduce and Observed Behavior
~/Downloads/zig-x86_64-linux-0.16.0-dev.2623+27eec9bd6/zig build -p sema-only -Dno-lib -Dno-langref -Ddev=sema -Doptimize=ReleaseFast
install
└─ install zig
└─ compile exe zig ReleaseFast native failure
error: process terminated with signal SEGV
failed command: /home/rad/Downloads/zig-x86_64-linux-0.16.0-dev.2623+27eec9bd6/zig build-exe --stack 48234496 -fno-sanitize-thread -OReleaseFast --dep aro --dep build_options -Mroot=/home/rad/lab/zig/src/main.zig -Maro=/home/rad/lab/zig/lib/compiler/aro/aro.zig -Mbuild_options=/home/rad/lab/zig/.zig-cache/c/e5eead726d7591be978b378eb4f144a5/options.zig --cache-dir /home/rad/lab/zig/.zig-cache --global-cache-dir /home/rad/.cache/zig --name zig --zig-lib-dir /home/rad/Downloads/zig-x86_64-linux-0.16.0-dev.2623+27eec9bd6/lib/ --listen=-
Build Summary: 1/4 steps succeeded (1 failed)
install transitive failure
└─ install zig transitive failure
└─ compile exe zig ReleaseFast native failure
error: the following build command failed with exit code 1:
/home/rad/lab/zig/.zig-cache/o/f9bf9fe1996084cbbf3af2e7f7ac205e/build /home/rad/Downloads/zig-x86_64-linux-0.16.0-dev.2623+27eec9bd6/zig /home/rad/Downloads/zig-x86_64-linux-0.16.0-dev.2623+27eec9bd6/lib /home/rad/lab/zig /home/rad/lab/zig/.zig-cache /home/rad/.cache/zig --seed 0xbe1c1da -Zf3e524a105e288ed -p sema-only -Dno-lib -Dno-langref -Ddev=sema -Doptimize=ReleaseFast
These complete OK
❯ ~/Downloads/zig-x86_64-linux-0.16.0-dev.2623+27eec9bd6/zig build -p sema-only -Dno-lib -Dno-langref -Ddev=sema
❯ ~/Downloads/zig-x86_64-linux-0.16.0-dev.2623+27eec9bd6/zig build -p sema-only -Dno-lib -Dno-langref -Ddev=sema -Duse-llvm=true
❯ ~/Downloads/zig-x86_64-linux-0.16.0-dev.2623+27eec9bd6/zig build -p sema-only -Dno-lib -Dno-langref -Ddev=sema -Doptimize=ReleaseSafe
Crash details:
stack trace from a build with `❯ ~/Downloads/zig-x86_64-linux-0.16.0-dev.2623+27eec9bd6/zig build -p stage5 -Dno-lib -Dno-langref `
❯ ./stage5/bin/zig build -p sema-only -Dno-lib -Dno-langref -Ddev=sema -Doptimize=ReleaseFast
install
└─ install zig
└─ compile exe zig ReleaseFast native failure
error: Compiler crash context:
Generating function 'Zcu.CodegenTaskPool.cancel'
thread 33101 panic: reached unreachable code
/home/rad/lab/zig/src/codegen/x86_64/CodeGen.zig:180972:35: 0x3bce9e3 in getResolvedInstValue (main.zig)
.none, .unreach, .dead => unreachable,
^
/home/rad/lab/zig/src/codegen/x86_64/CodeGen.zig:187568:49: 0x5d08304 in tempFromOperand (main.zig)
const tracking = cg.getResolvedInstValue(op_inst);
^
/home/rad/lab/zig/src/codegen/x86_64/CodeGen.zig:187586:97: 0x5cc5324 in tempsFromOperandsInner (main.zig)
for (op_temps, 0.., op_refs) |*op_temp, op_index, op_ref| op_temp.* = try cg.tempFromOperand(op_ref, for (op_refs[0..op_index]) |prev_op_ref| {
^
/home/rad/lab/zig/src/codegen/x86_64/CodeGen.zig:187597:34: 0x59ef326 in tempsFromOperands (main.zig)
try cg.tempsFromOperandsInner(inst, &op_temps, &op_refs);
^
/home/rad/lab/zig/src/codegen/x86_64/CodeGen.zig:2284:19: 0x5ce889e in genBodyBlock (main.zig)
try cg.genBody(body);
^
/home/rad/lab/zig/src/codegen/x86_64/CodeGen.zig:176407:26: 0x59878d9 in airCondBr (main.zig)
try self.genBodyBlock(then_body);
^
/home/rad/lab/zig/src/codegen/x86_64/CodeGen.zig:89023:41: 0x59c7eff in genBody (main.zig)
.cond_br => try cg.airCondBr(inst),
^
/home/rad/lab/zig/src/codegen/x86_64/CodeGen.zig:176514:21: 0x596c0b9 in lowerBlock (main.zig)
try self.genBody(body);
^
/home/rad/lab/zig/src/codegen/x86_64/CodeGen.zig:67353:34: 0x59c40a2 in genBody (main.zig)
try cg.lowerBlock(inst, block.body);
^
/home/rad/lab/zig/src/codegen/x86_64/CodeGen.zig:2284:19: 0x5ce889e in genBodyBlock (main.zig)
try cg.genBody(body);
^
/home/rad/lab/zig/src/codegen/x86_64/CodeGen.zig:67363:36: 0x59c441f in genBody (main.zig)
try cg.genBodyBlock(block.body);
^
/home/rad/lab/zig/src/codegen/x86_64/CodeGen.zig:176514:21: 0x596c0b9 in lowerBlock (main.zig)
try self.genBody(body);
^
/home/rad/lab/zig/src/codegen/x86_64/CodeGen.zig:67353:34: 0x59c40a2 in genBody (main.zig)
try cg.lowerBlock(inst, block.body);
^
/home/rad/lab/zig/src/codegen/x86_64/CodeGen.zig:2263:19: 0x568d51a in genMainBody (main.zig)
try cg.genBody(main_body[air_arg_count..]);
^
/home/rad/lab/zig/src/codegen/x86_64/CodeGen.zig:2059:29: 0x531e84c in gen (main.zig)
try self.genMainBody(zir, func_zir_inst, comptime_args, air_arg_count);
^
/home/rad/lab/zig/src/codegen/x86_64/CodeGen.zig:985:17: 0x4e7fd98 in generate (main.zig)
function.gen(&file.zir.?, func_zir.inst, func.comptime_args, call_info.air_arg_count) catch |err| switch (err) {
^
/home/rad/lab/zig/src/codegen.zig:163:45: 0x458aa45 in generateFunction (main.zig)
const mir = try CodeGen.generate(lf, pt, src_loc, func_index, air, liveness);
^
/home/rad/lab/zig/src/Zcu/PerThread.zig:4683:36: 0x3f321a7 in runCodegenInner (main.zig)
return codegen.generateFunction(lf, pt, zcu.navSrcLoc(nav), func_index, air, &liveness) catch |err| switch (err) {
^
/home/rad/lab/zig/src/Zcu/PerThread.zig:4559:43: 0x3832e15 in runCodegen (main.zig)
const codegen_result = runCodegenInner(pt, func_index, air);
^
/home/rad/lab/zig/src/Zcu.zig:4962:29: 0x31f6af0 in workerCodegenOwnedAir (main.zig)
return pt.runCodegen(func_index, &air);
^
/home/rad/Downloads/zig-x86_64-linux-0.16.0-dev.2623+27eec9bd6/lib/std/Io.zig:2052:13: 0x2c1752f in start (std.zig)
result_casted.* = @call(.auto, function, args_casted.*);
^
/home/rad/Downloads/zig-x86_64-linux-0.16.0-dev.2623+27eec9bd6/lib/std/Io/Threaded.zig:683:20: 0x1ae7c61 in start (std.zig)
future.func(future.contextPointer(), future.resultPointer());
^
/home/rad/Downloads/zig-x86_64-linux-0.16.0-dev.2623+27eec9bd6/lib/std/Io/Threaded.zig:1756:29: 0x1b9c27a in worker (std.zig)
runnable.startFn(runnable, &thread, t);
^
/home/rad/Downloads/zig-x86_64-linux-0.16.0-dev.2623+27eec9bd6/lib/std/Thread.zig:423:13: 0x1b4fbb5 in callFn__anon_31384 (std.zig)
@call(.auto, f, args);
^
/home/rad/Downloads/zig-x86_64-linux-0.16.0-dev.2623+27eec9bd6/lib/std/Thread.zig:1375:30: 0x1ae8e30 in entryFn (std.zig)
return callFn(f, self.fn_args);
^
/home/rad/Downloads/zig-x86_64-linux-0.16.0-dev.2623+27eec9bd6/lib/std/os/linux/x86_64.zig:105:5: 0x1b4fc95 in clone (std.zig)
asm volatile (
^
error: process terminated with signal ABRT
failed command: /home/rad/lab/zig/build/stage5/bin/zig build-exe --stack 48234496 -fno-sanitize-thread -OReleaseFast --dep aro --dep build_options -Mroot=/home/rad/lab/zig/src/main.zig -Maro=/home/rad/lab/zig/lib/compiler/aro/aro.zig -Mbuild_options=/home/rad/lab/zig/.zig-cache/c/e5eead726d7591be978b378eb4f144a5/options.zig --cache-dir /home/rad/lab/zig/.zig-cache --global-cache-dir /home/rad/.cache/zig --name zig --zig-lib-dir /home/rad/lab/zig/lib/ --listen=-
Build Summary: 1/4 steps succeeded (1 failed)
install transitive failure
└─ install zig transitive failure
└─ compile exe zig ReleaseFast native failure
error: the following build command failed with exit code 1:
/home/rad/lab/zig/.zig-cache/o/c1748430f8954726666da0bc81d5ad0a/build /home/rad/lab/zig/build/stage5/bin/zig /home/rad/lab/zig/lib /home/rad/lab/zig /home/rad/lab/zig/.zig-cache /home/rad/.cache/zig --seed 0x85593ce1 -Z9ecc91058833bd36 -p sema-only -Dno-lib -Dno-langref -Ddev=sema -Doptimize=ReleaseFast