Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler crash after new comptime-mutable memory analysis merge #19457

Closed
mitchellh opened this issue Mar 28, 2024 · 9 comments
Closed

Compiler crash after new comptime-mutable memory analysis merge #19457

mitchellh opened this issue Mar 28, 2024 · 9 comments
Labels
bug Observed behavior contradicts documented or intended behavior regression It worked in a previous version of Zig, but stopped working.
Milestone

Comments

@mitchellh
Copy link
Contributor

mitchellh commented Mar 28, 2024

Zig Version

0.12.0-dev.3457+341857e5c

Steps to Reproduce and Observed Behavior

Check out this branch: https://github.com/mitchellh/ghostty/tree/update-zig (all Zig core has access to this repo, if you don't ping me)

Run zig build test or zig build. This crash only happens on macOS.

I don't have a debug build of the compiler to get the error, sorry.

Expected Behavior

No crash, though I do expect that that branch at the time of authoring this issue has more comptime var violations I have to fix.

@mitchellh mitchellh added the bug Observed behavior contradicts documented or intended behavior label Mar 28, 2024
@andrewrk andrewrk added the regression It worked in a previous version of Zig, but stopped working. label Mar 28, 2024
@andrewrk andrewrk added this to the 0.12.0 milestone Mar 28, 2024
@andrewrk
Copy link
Member

andrewrk commented Apr 4, 2024

Regressed by #19414.

@andrewrk
Copy link
Member

andrewrk commented Apr 5, 2024

I don't get a compiler crash, I get a build script error:

andy@Andrews-MBP ghostty % ~/dev/zig/build-release/stage4/bin/zig build
thread 2482558 panic: unhandled error
/Users/andy/Downloads/ghostty/pkg/apple-sdk/build.zig:43:41: 0x10249fce3 in addPaths (build)
    const path = gop.value_ptr.* orelse return switch (target.os.tag) {
                                        ^
/Users/andy/Downloads/ghostty/pkg/freetype/build.zig:20:9: 0x10261aaff in build (build)
        try apple_sdk.addPaths(b, &lib.root_module);
        ^
/Users/andy/dev/zig/lib/std/Build.zig:2001:24: 0x10257a783 in runBuild__anon_19024 (build)
        .ErrorUnion => try build_zig.build(b),
                       ^
/Users/andy/dev/zig/lib/std/Build.zig:1981:40: 0x102513d6f in dependencyInner__anon_18081 (build)
        sub_builder.runBuild(bz) catch @panic("unhandled error");
                                       ^
/Users/andy/dev/zig/lib/std/Build.zig:1881:35: 0x1024a740b in dependency__anon_11562 (build)
            return dependencyInner(b, name, pkg.build_root, if (@hasDecl(pkg, "build_zig")) pkg.build_zig else null, pkg.deps, args);
                                  ^
/Users/andy/Downloads/ghostty/pkg/cimgui/build.zig:15:34: 0x1026057a7 in build (build)
    const freetype = b.dependency("freetype", .{
                                 ^
/Users/andy/dev/zig/lib/std/Build.zig:2001:43: 0x10257a3fb in runBuild__anon_19012 (build)
        .ErrorUnion => try build_zig.build(b),
                                          ^
/Users/andy/dev/zig/lib/std/Build.zig:1981:29: 0x10250b203 in dependencyInner__anon_17867 (build)
        sub_builder.runBuild(bz) catch @panic("unhandled error");
                            ^
/Users/andy/dev/zig/lib/std/Build.zig:1881:35: 0x1024a537b in dependency__anon_11561 (build)
            return dependencyInner(b, name, pkg.build_root, if (@hasDecl(pkg, "build_zig")) pkg.build_zig else null, pkg.deps, args);
                                  ^
/Users/andy/Downloads/ghostty/build.zig:923:36: 0x1024a27e3 in addDeps (build)
    const cimgui_dep = b.dependency("cimgui", .{
                                   ^
/Users/andy/Downloads/ghostty/build.zig:879:31: 0x1024b0a1f in createIOSLib (build)
    var lib_list = try addDeps(b, lib, ios_config);
                              ^
/Users/andy/Downloads/ghostty/build.zig:540:66: 0x1024b3d8b in build (build)
        const ios_lib_step, const ios_lib_path = try createIOSLib(
                                                                 ^
/Users/andy/dev/zig/lib/std/Build.zig:2001:43: 0x102471957 in runBuild__anon_8413 (build)
        .ErrorUnion => try build_zig.build(b),
                                          ^
/Users/andy/dev/zig/lib/compiler/build_runner.zig:310:29: 0x10246c4ab in main (build)
        try builder.runBuild(root);
                            ^
/Users/andy/dev/zig/lib/std/start.zig:511:37: 0x102474347 in main (build)
            const result = root.main() catch |err| {
                                    ^

Looks like I need some kind of SDK in order to reproduce.

@mitchellh
Copy link
Contributor Author

@andrewrk Yeah that's a separate issue: you need Xcode installed with both the macOS and iOS SDKs (check to download in GUI). You can probably just disable iOS too with some changes to make that a bit easier on yourself.

@mitchellh
Copy link
Contributor Author

FYI I built Zig from source but due to other breaking changes the branch isn't building for other reasons now. I'm working on getting the deps updated so I can get back to the reported issue and verify it again.

@mitchellh
Copy link
Contributor Author

With the latest Zig I now only get this:

test
└─ run ghostty-test
   └─ zig test ghostty-test Debug native-native.12.0 2 errors
src/font/face/Metrics.zig:207:23: error: comptime dereference requires '[7]builtin.Type.EnumField' to have a well-defined layout, but it does not.
    break :key @Type(.{
                     ~^
referenced by:
    ModifierSet: src/font/face/Metrics.zig:84:50
    font.Group: src/font/Group.zig:91:37
    remaining reference tr
src/config/key.zig:24:23: error: comptime dereference requires '[98]builtin.Type.EnumField' to have a well-defined layout, but it does not.
    break :key @Type(.{

I believe this is already being tracked, so once this gets fixed up then I'll try again. cc @mlugg

@mlugg
Copy link
Member

mlugg commented Apr 12, 2024

Should be handled by my latest PR - it's not passing CI yet, but it can build ghostty in my testing. If you're able to build a compiler, would you be able to check it works for you?

@mitchellh
Copy link
Contributor Author

@mlugg with your PR:

test
+- run ghostty-test
   +- zig test ghostty-test Debug native-native.12.0 failure
error: thread 11382978 panic: reached unreachable code
Analyzing /Users/mitchellh/.cache/zig/p/1220f05bb06ce2704ae7b183514ce415719469bf1fa025b3158c55f7cc4755cb1fa5/src/heap.zig: heap.zig:Intrusive
      %28 = dbg_stmt(6, 5)
    > %29 = extended(struct_decl(hash(b35c7237cb0999d6acbe60b8a88a078d) known_non_opv, func, { %11, %13, %27 }, auto, {
        %30 = declaration('Self' line(+6) hash(e636bd82946b5e97c8b7772b5702d6b7) value={%31, %32}) 
        %40 = declaration(pub 'insert' line(+14) hash(a332752178bcfd1c7e13b86808328191) value={%44..%75}) 
        %76 = declaration(pub 'peek' line(+19) hash(57d2f2165b7ea12c7ce17854642a17c8) value={%80..%92}) 
        %93 = declaration(pub 'deleteMin' line(+24) hash(aa6faa8a2c9c28091bc0cb4b088ad645) value={%97..%151}) 
        %152 = declaration(pub 'remove' line(+39) hash(d25ef67f8d753af219f5e82f7d920836) value={%156..%300}) 
        %301 = declaration('meld' line(+75) hash(b569c6dd667b59190e0eed56b602710b) value={%305..%472}) 
        %473 = declaration('combine_siblings' line(+119) hash(02f2937deb7fdd0e053352396860356e) value={%477..%625}) 
      }, {
        root: {%33..%36} = {%37},
        context: {%38, %39},
      }) 
      %626 = restore_err_ret_index_unconditional(.none) 
      %627 = dbg_stmt(6, 5)
      %628 = ret_node(%29) 
    For full context, use the command
      zig ast-check -t /Users/mitchellh/.cache/zig/p/1220f05bb06ce2704ae7b183514ce415719469bf1fa025b3158c55f7cc4755cb1fa5/src/heap.zig

  in /Users/mitchellh/.cache/zig/p/1220f05bb06ce2704ae7b183514ce415719469bf1fa025b3158c55f7cc4755cb1fa5/src/backend/kqueue.zig: backend/kqueue.zig:Loop.TimerHeap
    > %49 = field_call(.compile_time, %47, "Intrusive", [
        {%50, %51},
        {%52},
        {%53..%55},
      ]) 
  in /Users/mitchellh/.cache/zig/p/1220f05bb06ce2704ae7b183514ce415719469bf1fa025b3158c55f7cc4755cb1fa5/src/backend/kqueue.zig: backend/kqueue.zig:Loop
    > %100 = decl_val("TimerHeap") 
  in src/renderer/cursor.zig: renderer/cursor.zig:cursorStyle
    > %45 = param("state", {%42..%44}) 
  in /Users/mitchellh/code/3rdparty/zig/build/stage3/lib/zig/std/testing.zig: testing.zig:refAllDecls__anon_1716
    > %5107 = field_ptr_named(%5103, %5104) 
  in /Users/mitchellh/code/3rdparty/zig/build/stage3/lib/zig/std/testing.zig: testing.zig:refAllDecls__anon_1716
    > %5098 = condbr_inline(%5097, {%5100..%5109}, {%5110}) 
  in /Users/mitchellh/code/3rdparty/zig/build/stage3/lib/zig/std/testing.zig: testing.zig:refAllDecls__anon_1716
    > %5099 = block_inline({%5097, %5098}) 
  in /Users/mitchellh/code/3rdparty/zig/build/stage3/lib/zig/std/testing.zig: testing.zig:refAllDecls__anon_1716
    > %5095 = block_inline({%5096..%5113}) 

/Users/mitchellh/code/3rdparty/zig/src/type.zig:1335:31: 0x10ef937cf in abiSizeAdvanced (zig)
                .func_type => unreachable, // represents machine code; not a pointer
                              ^
/Users/mitchellh/code/3rdparty/zig/src/type.zig:1199:32: 0x10ef9547b in abiSize (zig)
        return (abiSizeAdvanced(ty, mod, .eager) catch unreachable).scalar;
                               ^
/Users/mitchellh/code/3rdparty/zig/src/Value.zig:4051:42: 0x10f2989eb in pointerDerivation (zig)
    const need_bytes = need_child.abiSize(zcu);
                                         ^
/Users/mitchellh/code/3rdparty/zig/src/print_value.zig:287:53: 0x110dbc77b in printPtr__anon_130829 (zig)
    const derivation = try ptr_val.pointerDerivation(arena.allocator(), zcu, opt_sema);
                                                    ^
/Users/mitchellh/code/3rdparty/zig/src/print_value.zig:148:25: 0x110af874b in print__anon_125953 (zig)
            try printPtr(val, writer, level, mod, opt_sema);
                        ^
/Users/mitchellh/code/3rdparty/zig/src/print_value.zig:31:17: 0x110af6757 in format__anon_125952 (zig)
    return print(ctx.val, writer, 3, ctx.mod, ctx.opt_sema) catch |err| switch (err) {
                ^
/Users/mitchellh/code/3rdparty/zig/lib/std/fmt.zig:1480:26: 0x110604d47 in format__anon_118017 (zig)
            try format_fn(self.data, fmt, options, writer);
                         ^
/Users/mitchellh/code/3rdparty/zig/lib/std/fmt.zig:494:32: 0x11006116f in formatType__anon_110066 (zig)
        return try value.format(actual_fmt, options, writer);
                               ^
/Users/mitchellh/code/3rdparty/zig/lib/std/fmt.zig:185:23: 0x1103f8c93 in format__anon_114907 (zig)
        try formatType(
                      ^
/Users/mitchellh/code/3rdparty/zig/lib/std/io/Writer.zig:23:26: 0x10fe66c0f in print__anon_101959 (zig)
    return std.fmt.format(self, format, args);
                         ^
/Users/mitchellh/code/3rdparty/zig/lib/std/io.zig:324:47: 0x10fe65853 in createAnonymousDeclTypeNamed (zig)
            return @errorCast(self.any().print(format, args));
                                              ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:2827:65: 0x10f9ed15f in zirStructDecl (zig)
    const new_decl_index = try sema.createAnonymousDeclTypeNamed(
                                                                ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:1215:66: 0x10f4dabd7 in analyzeBodyInner (zig)
                    .struct_decl        => try sema.zirStructDecl(        block, extended, inst),
                                                                 ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:892:26: 0x10f4d2de7 in analyzeFnBody (zig)
    sema.analyzeBodyInner(block, body) catch |err| switch (err) {
                         ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:7907:35: 0x10fad1227 in analyzeCall (zig)
                sema.analyzeFnBody(&child_block, fn_info.body) catch |err| switch (err) {
                                  ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:7110:43: 0x10f98752f in zirCall__anon_92159 (zig)
    const call_inst = try sema.analyzeCall(block, func, func_ty, callee_src, call_src, modifier, ensure_result_used, args_info, call_dbg_node, .call);
                                          ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:1015:62: 0x10f4d413f in analyzeBodyInner (zig)
            .field_call                   => try sema.zirCall(block, inst, .field),
                                                             ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:910:30: 0x10f231e03 in analyzeInlineBody (zig)
    if (sema.analyzeBodyInner(block, body)) |_| {
                             ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:936:39: 0x10efa645f in resolveInlineBody (zig)
    return (try sema.analyzeInlineBody(block, body, break_target)) orelse .unreachable_value;
                                      ^
/Users/mitchellh/code/3rdparty/zig/src/Module.zig:3650:50: 0x10efa2fd7 in semaDecl (zig)
    const result_ref = try sema.resolveInlineBody(&block_scope, decl_bodies.value_body, decl_inst);
                                                 ^
/Users/mitchellh/code/3rdparty/zig/src/Module.zig:3015:32: 0x10ed9c84f in ensureDeclAnalyzed (zig)
        break :blk mod.semaDecl(decl_index) catch |err| switch (err) {
                               ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:31889:27: 0x10ef9f3ff in ensureDeclAnalyzed (zig)
    mod.ensureDeclAnalyzed(decl_index) catch |err| {
                          ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:31934:32: 0x10fad377f in analyzeDeclRefInner (zig)
    try sema.ensureDeclAnalyzed(decl_index);
                               ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:31849:50: 0x10fad3193 in analyzeDeclVal (zig)
    const decl_ref = try sema.analyzeDeclRefInner(decl_index, false);
                                                 ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:6793:31: 0x10f989c7f in zirDeclVal (zig)
    return sema.analyzeDeclVal(block, src, decl);
                              ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:1023:65: 0x10f4d466f in analyzeBodyInner (zig)
            .decl_val                     => try sema.zirDeclVal(block, inst),
                                                                ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:910:30: 0x10f231e03 in analyzeInlineBody (zig)
    if (sema.analyzeBodyInner(block, body)) |_| {
                             ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:936:39: 0x10efa645f in resolveInlineBody (zig)
    return (try sema.analyzeInlineBody(block, body, break_target)) orelse .unreachable_value;
                                      ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:36211:54: 0x10faf0c47 in semaStructFields (zig)
            const ty_ref = try sema.resolveInlineBody(&block_scope, body, zir_index);
                                                     ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:35775:21: 0x10f5f0c67 in resolveTypeFieldsStruct (zig)
    semaStructFields(mod, sema.arena, struct_type) catch |err| switch (err) {
                    ^
/Users/mitchellh/code/3rdparty/zig/src/type.zig:2713:61: 0x10f24604f in comptimeOnlyAdvanced (zig)
                            try sema.resolveTypeFieldsStruct(ty.toIntern(), struct_type);
                                                            ^
/Users/mitchellh/code/3rdparty/zig/src/type.zig:2719:89: 0x10f2462c3 in comptimeOnlyAdvanced (zig)
                                if (try Type.fromInterned(field_ty).comptimeOnlyAdvanced(mod, opt_sema)) {
                                                                                        ^
/Users/mitchellh/code/3rdparty/zig/src/type.zig:2719:89: 0x10f2462c3 in comptimeOnlyAdvanced (zig)
                                if (try Type.fromInterned(field_ty).comptimeOnlyAdvanced(mod, opt_sema)) {
                                                                                        ^
/Users/mitchellh/code/3rdparty/zig/src/type.zig:2627:69: 0x10f24580b in comptimeOnlyAdvanced (zig)
                        else => return child_ty.comptimeOnlyAdvanced(mod, opt_sema),
                                                                    ^
/Users/mitchellh/code/3rdparty/zig/src/type.zig:2719:89: 0x10f2462c3 in comptimeOnlyAdvanced (zig)
                                if (try Type.fromInterned(field_ty).comptimeOnlyAdvanced(mod, opt_sema)) {
                                                                                        ^
/Users/mitchellh/code/3rdparty/zig/src/type.zig:2627:69: 0x10f24580b in comptimeOnlyAdvanced (zig)
                        else => return child_ty.comptimeOnlyAdvanced(mod, opt_sema),
                                                                    ^
/Users/mitchellh/code/3rdparty/zig/src/type.zig:2636:90: 0x10f245b97 in comptimeOnlyAdvanced (zig)
                .opt_type => |child| return Type.fromInterned(child).comptimeOnlyAdvanced(mod, opt_sema),
                                                                                         ^
/Users/mitchellh/code/3rdparty/zig/src/type.zig:2719:89: 0x10f2462c3 in comptimeOnlyAdvanced (zig)
                                if (try Type.fromInterned(field_ty).comptimeOnlyAdvanced(mod, opt_sema)) {
                                                                                        ^
/Users/mitchellh/code/3rdparty/zig/src/type.zig:2627:69: 0x10f24580b in comptimeOnlyAdvanced (zig)
                        else => return child_ty.comptimeOnlyAdvanced(mod, opt_sema),
                                                                    ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:37637:35: 0x10ef9a923 in typeRequiresComptime (zig)
    return ty.comptimeOnlyAdvanced(sema.mod, sema);
                                  ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:10107:50: 0x10fa1d223 in zirParam (zig)
    const is_comptime = sema.typeRequiresComptime(param_ty) catch |err| switch (err) {
                                                 ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:1422:34: 0x10f4ddebf in analyzeBodyInner (zig)
                try sema.zirParam(block, inst, false);
                                 ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:910:30: 0x10f231e03 in analyzeInlineBody (zig)
    if (sema.analyzeBodyInner(block, body)) |_| {
                             ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:936:39: 0x10efa645f in resolveInlineBody (zig)
    return (try sema.analyzeInlineBody(block, body, break_target)) orelse .unreachable_value;
                                      ^
/Users/mitchellh/code/3rdparty/zig/src/Module.zig:3650:50: 0x10efa2fd7 in semaDecl (zig)
    const result_ref = try sema.resolveInlineBody(&block_scope, decl_bodies.value_body, decl_inst);
                                                 ^
/Users/mitchellh/code/3rdparty/zig/src/Module.zig:3015:32: 0x10ed9c84f in ensureDeclAnalyzed (zig)
        break :blk mod.semaDecl(decl_index) catch |err| switch (err) {
                               ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:31889:27: 0x10ef9f3ff in ensureDeclAnalyzed (zig)
    mod.ensureDeclAnalyzed(decl_index) catch |err| {
                          ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:31934:32: 0x10fad377f in analyzeDeclRefInner (zig)
    try sema.ensureDeclAnalyzed(decl_index);
                               ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:31925:36: 0x10f5ec7b7 in analyzeDeclRef (zig)
    return sema.analyzeDeclRefInner(decl_index, true);
                                   ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:27944:35: 0x10fa2e0bf in namespaceLookupRef (zig)
    return try sema.analyzeDeclRef(decl);
                                  ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:27676:52: 0x10f4e50db in fieldPtr (zig)
                    if (try sema.namespaceLookupRef(block, src, child_type.getNamespaceIndex(mod), field_name)) |inst| {
                                                   ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:10382:25: 0x10f98f077 in zirFieldPtrNamed (zig)
    return sema.fieldPtr(block, src, object_ptr, field_name, field_name_src, false);
                        ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:1043:71: 0x10f4d524b in analyzeBodyInner (zig)
            .field_ptr_named              => try sema.zirFieldPtrNamed(block, inst),
                                                                      ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:910:30: 0x10f231e03 in analyzeInlineBody (zig)
    if (sema.analyzeBodyInner(block, body)) |_| {
                             ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:1735:58: 0x10f4e0487 in analyzeBodyInner (zig)
                const result = try sema.analyzeInlineBody(block, inline_body, inst) orelse break;
                                                         ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:1625:81: 0x10f4df46f in analyzeBodyInner (zig)
                    const break_result: ?BreakResult = if (sema.analyzeBodyInner(&child_block, inline_body)) |_| r: {
                                                                                ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:1625:81: 0x10f4df46f in analyzeBodyInner (zig)
                    const break_result: ?BreakResult = if (sema.analyzeBodyInner(&child_block, inline_body)) |_| r: {
                                                                                ^
/Users/mitchellh/code/3rdparty/zig/src/Sema.zig:892:26: 0x10f4d2de7 in analyzeFnBody (zig)
    sema.analyzeBodyInner(block, body) catch |err| switch (err) {
                         ^
/Users/mitchellh/code/3rdparty/zig/src/Module.zig:4633:23: 0x10f1ef32b in analyzeFnBody (zig)
    sema.analyzeFnBody(&inner_block, fn_info.body) catch |err| switch (err) {
                      ^
/Users/mitchellh/code/3rdparty/zig/src/Module.zig:3143:32: 0x10ef7fd4b in ensureFuncBodyAnalyzed (zig)
    var air = zcu.analyzeFnBody(func_index, sema_arena) catch |err| switch (err) {
                               ^
/Users/mitchellh/code/3rdparty/zig/src/Compilation.zig:3419:42: 0x10ef7dd0f in processOneJob (zig)
            module.ensureFuncBodyAnalyzed(func) catch |err| switch (err) {
                                         ^
/Users/mitchellh/code/3rdparty/zig/src/Compilation.zig:3359:30: 0x10edc44e3 in performAllTheWork (zig)
            try processOneJob(comp, work_item, main_progress_node);
                             ^
/Users/mitchellh/code/3rdparty/zig/src/Compilation.zig:2132:31: 0x10edc018b in update (zig)
    try comp.performAllTheWork(main_progress_node);
                              ^
/Users/mitchellh/code/3rdparty/zig/src/main.zig:4105:36: 0x10ee33e8b in serve (zig)
                    try comp.update(main_progress_node);
                                   ^
/Users/mitchellh/code/3rdparty/zig/src/main.zig:3371:22: 0x10ee50a9b in buildOutputType (zig)
            try serve(
                     ^
/Users/mitchellh/code/3rdparty/zig/src/main.zig:266:31: 0x10ecbc08f in mainArgs (zig)
        return buildOutputType(gpa, arena, args, .zig_test);
                              ^
/Users/mitchellh/code/3rdparty/zig/src/main.zig:206:20: 0x10ecb9283 in main (zig)
    return mainArgs(gpa, arena, args);
                   ^
/Users/mitchellh/code/3rdparty/zig/lib/std/start.zig:511:37: 0x10ecb8e9f in main (zig)
            const result = root.main() catch |err| {
                                    ^
???:?:?: 0x18fa1a0df in ??? (???)
???:?:?: 0xee767fffffffffff in ??? (???)

error: the following command terminated unexpectedly:
/Users/mitchellh/code/3rdparty/zig/build/stage3/bin/zig test /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/src/stb/stb.c /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/src/simd/codepoint_width.cpp /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/src/simd/index_of.cpp /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/src/simd/vt.cpp /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/15b61bc42fecc2b716c82929b480db8a/libmacos.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/dde15e1f0c22952470e3a4598b09ce7c/libcimgui.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/9455d7445252f600544836f81ccf0e44/libglslang.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/34d4000b409ed175c647fba16397268d/libhighway.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/970dea8f2e2ff25e6e53d4d4111dd885/libsimdutf.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/a3071b9cea406fec8a8c089860719b4f/libutfcpp.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/9598d61be9ba478d5d2851ef0c0cb94e/libspirv_cross.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/1ca20ae9a4eab90b01d67d8e49b56061/liboniguruma.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/97c2278dd0c7006e16fee7aae22825fa/libz.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/b9d85da75a2ffea0df9708844050b884/libpng.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/ba3d2157f1130fa2dc7cbbcb7ffae7b7/libfreetype.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/2cc616930f6673883543618119e6bd1d/libharfbuzz.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/9078de05a3fe15a6e67c38ae0f7c58c1/libpixman.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/vendor/glad/src/gl.c -ODebug -target native-native.12.0 -mcpu native -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/src/stb -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/src -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/include -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/5b922a3ccc95db0eef8ecfd715d5b1f7 -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/c8a82fa60667ccb8b2c7c3d2d554792b -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/29f0f8287d5e246abb5d343cd151b1f2 -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/ac2275f7d9412eb7863ded6eb07ad152 -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/eeb388675cde03d838ca5d2c569bdac2 -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/1e0dbfa5e32a14b4c075dcde96d99e72 -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/07bb57eb756e62dc944b8f3650020eef -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/1e901245d71b380ad693b443cced9ded -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/1d5b7702001be50b97b6d663faea3545 -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/bfa834779a726e85b81edbfd939b54d7 -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/59a52f6fce7092a6b828e671524d7809 -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/ab903b0cc697fbcfa4dc98effecad874 -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/204b34887ca32a136488e6ad6c619829 -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/vendor/glad/include -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/lib --dep build_options --dep oniguruma --dep freetype --dep glslang --dep spirv_cross --dep harfbuzz --dep xev --dep opengl --dep pixman --dep ziglyph --dep objc --dep macos --dep cimgui --dep help_strings --dep unicode_tables -Mroot=/Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/src/main.zig -Mbuild_options=/Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/c/d4def74245b6382b60b2579bf0419db4/options.zig -I /Users/mitchellh/.cache/zig/p/1220c15e72eadd0d9085a8af134904d9a0f5dfcbed5f606ad60edc60ebeccd9706bb/src -Moniguruma=/Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/pkg/oniguruma/main.zig -I /Users/mitchellh/.cache/zig/p/1220b81f6ecfb3fd222f76cf9106fecfa6554ab07ec7fdc4124b9bb063ae2adf969d/include -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/pkg/freetype -Mfreetype=/Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/pkg/freetype/main.zig -ODebug -target native-native.12.0 -mcpu native -I /Users/mitchellh/.cache/zig/p/1220481fe19def1172cd0728743019c0f440181a6342b62d03e24d05c70141516799 -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/pkg/glslang/override -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/include -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/lib -Mglslang=/Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/pkg/glslang/main.zig -I /Users/mitchellh/.cache/zig/p/1220b2d8a6cff1926ef28a29e312a0a503b555ebc2f082230b882410f49e672ac9c6 -Mspirv_cross=/Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/pkg/spirv-cross/main.zig -ODebug -target native-native.12.0 -mcpu native -I /Users/mitchellh/.cache/zig/p/1220d27d0e3ddd47705cbe1505076058cb41649336d35ea51369ec8f042c35991e0f/src -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/include -I /Users/mitchellh/.cache/zig/p/1220b81f6ecfb3fd222f76cf9106fecfa6554ab07ec7fdc4124b9bb063ae2adf969d/include -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/lib --dep freetype --dep macos -Mharfbuzz=/Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/pkg/harfbuzz/main.zig -Mxev=/Users/mitchellh/.cache/zig/p/1220f05bb06ce2704ae7b183514ce415719469bf1fa025b3158c55f7cc4755cb1fa5/src/main.zig -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/vendor/glad/include -Mopengl=/Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/pkg/opengl/main.zig -I /Users/mitchellh/.cache/zig/p/12209b9206f9a5d31ccd9a2312cc72cb9dfc3e034aee1883c549dc1d753fae457230/pixman -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/pkg/pixman -Mpixman=/Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/pkg/pixman/main.zig -Mziglyph=/Users/mitchellh/.cache/zig/p/12208553f3f47e51494e187f4c0e6f6b3844e3993436cad4a0e8c4db4e99645967b5/src/ziglyph.zig -lobjc -ODebug -target native-native.12.0 -mcpu native -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/include -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/lib -Mobjc=/Users/mitchellh/.cache/zig/p/1220014cd3774aa0b18320e6527ed7b3270412c70958ab16a3c55070ffb7f2042f87/src/main.zig -ODebug -target native-native.12.0 -mcpu native -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/include -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/lib -Mmacos=/Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/pkg/macos/main.zig -ODebug -target native-native.12.0 -mcpu native -I /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/pkg/cimgui/vendor -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/System/Library/Frameworks -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/include -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/lib -Mcimgui=/Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/pkg/cimgui/main.zig -Mhelp_strings=/Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/426fb522cd481e32ad905982b8cef4ae/stdout -Municode_tables=/Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/3324f42f013434df4e48fdd56cc66ba6/stdout /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/ba3d2157f1130fa2dc7cbbcb7ffae7b7/libfreetype.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/97c2278dd0c7006e16fee7aae22825fa/libz.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/97c2278dd0c7006e16fee7aae22825fa/libz.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/b9d85da75a2ffea0df9708844050b884/libpng.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/8e626f92b71e7a0e10b5c43dbda264e6/libfreetype.a /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/97c2278dd0c7006e16fee7aae22825fa/libz.a -framework CoreText -framework Foundation -framework Carbon -framework CoreFoundation -framework CoreGraphics -framework CoreVideo -framework QuartzCore -lc++ -lc --cache-dir /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache --global-cache-dir /Users/mitchellh/.cache/zig --name ghostty-test --listen=- 
Build Summary: 35/38 steps succeeded; 1 failed (disable with --summary none)
test transitive failure
+- run ghostty-test transitive failure
   +- zig test ghostty-test Debug native-native.12.0 failure
error: the following build command failed with exit code 1:
/Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache/o/fefa91eeddf8aa255fa9ec5d0242527f/build /Users/mitchellh/code/3rdparty/zig/build/stage3/bin/zig /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/zig-cache /Users/mitchellh/.cache/zig --seed 0x12293511 -Z757a379b4d9209ba test

@mitchellh
Copy link
Contributor Author

I got that past that with @mlugg's PR. I believe this issue is resolved when that is merged.

@andrewrk
Copy link
Member

Fix landed in 1fb2381.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior regression It worked in a previous version of Zig, but stopped working.
Projects
None yet
Development

No branches or pull requests

3 participants