Crash when building zls-0.11.0 on FreeBSD-13.2

morgoth% zig build
Semantic Analysis [4513] thread 100637 panic: attempt to use null value
Analyzing /home/nathan/.cache/zig/p/122089a8247a693cad53beb161bde6c30f71376cd4298798d45b32740c3581405864/build.zig: build.zig:build
    > %5 = decl_val("std")
      %6 = field_val(%4, "Build")
      %7 = ptr_type(%5, One)
      %8 = break_inline(%9, %6)
    For full context, use the command
      zig ast-check -t /home/nathan/.cache/zig/p/122089a8247a693cad53beb161bde6c30f71376cd4298798d45b32740c3581405864/build.zig

  in /home/nathan/.cache/zig/p/122089a8247a693cad53beb161bde6c30f71376cd4298798d45b32740c3581405864/build.zig: build.zig:build
    > %9 = param("b", {%5..%8})
  in /home/nathan/zig/lib/zig/std/Build.zig: Build.zig:runBuild__anon_47666
    > %9805 = field_val(%9796, "build") node_offset:1637:41 to :1637:56
  in /home/nathan/zig/lib/zig/std/Build.zig: Build.zig:runBuild__anon_47666
    > %9803 = typeof_builtin({%9804..%9806}) node_offset:1637:33 to :1637:57
  in /home/nathan/zig/lib/zig/std/Build.zig: Build.zig:runBuild__anon_47666
    > %9802 = block_comptime({%9803..%9811}) node_offset:1637:23 to :1637:75
  in /home/nathan/zig/lib/zig/std/Build.zig: Build.zig:runBuild__anon_47666
    > %9799 = block({%9800..%9846}) node_offset:1636:62 to :1636:63

Unwind information for `libc.so.7:0x811fcade0` was not available, trace may be incomplete

zsh: abort (core dumped)  zig build

No idea where to begin here. I’m not even sure if this is a zls problem or a zig problem (my best guess is zig itself).

Yes that’s a crash in the compiler. Can you clean both the local zig-cache and the global one? Which version of Zig are you using?

It will have to wait until I’m home in a couple of hours. It’s version 0.11.0.

Cleaning the global cache fixed it. Thanks kristoff.

Now I need to figure out why it immediately exits, but that’s another story…

1 Like