Skip to content

segfault when trying to append to tuple #3979

Closed
@daurnimator

Description

@daurnimator
test "" {
    var args = .{};
    args = args ++ .{ "2" };
}
#12 0x0000555555640b3f in ir_assert (ok=false, source_instruction=0x555555dabbb0) at zig/src/ir.cpp:9225
#13 0x0000555555652d18 in ir_analyze_cast (ira=0x555555da9ca0, source_instr=0x555555dabbb0, wanted_type=0x555555daa4b0, value=0x555555dabbb0) at zig/src/ir.cpp:13941
#14 0x00005555556531ef in ir_implicit_cast2 (ira=0x555555da9ca0, value_source_instr=0x555555dabbb0, value=0x555555dabbb0, expected_type=0x555555daa4b0)
    at zig/src/ir.cpp:14003
#15 0x000055555565321e in ir_implicit_cast (ira=0x555555da9ca0, value=0x555555dabbb0, expected_type=0x555555daa4b0) at zig/src/ir.cpp:14007
#16 0x0000555555661689 in ir_analyze_store_ptr (ira=0x555555da9ca0, source_instr=0x555555ba8b30, ptr=0x555555ba6ce0, uncasted_value=0x555555dabbb0, allow_write_through_const=false)
    at zig/src/ir.cpp:17922
#17 0x00005555556893df in ir_analyze_instruction_end_expr (ira=0x555555da9ca0, instruction=0x555555ba8b30) at zig/src/ir.cpp:28115
#18 0x000055555568ad9e in ir_analyze_instruction_base (ira=0x555555da9ca0, instruction=0x555555ba8b30) at zig/src/ir.cpp:28665
#19 0x000055555568b28d in ir_analyze (codegen=0x555555a10b20, old_exec=0x555555ac3420, new_exec=0x555555ac3260, expected_type=0x555555aa96a0, expected_type_source_node=0x0)
    at zig/src/ir.cpp:28750
#20 0x00005555556e02d9 in analyze_fn_ir (g=0x555555a10b20, fn=0x555555ac31e0, return_type_node=0x0) at zig/src/analyze.cpp:4648
#21 0x00005555556e08a6 in analyze_fn_body (g=0x555555a10b20, fn_table_entry=0x555555ac31e0) at zig/src/analyze.cpp:4756
#22 0x00005555556e113f in semantic_analyze (g=0x555555a10b20) at zig/src/analyze.cpp:4868
#23 0x000055555560c2f5 in gen_root_source (g=0x555555a10b20) at zig/src/codegen.cpp:9308
#24 0x0000555555610108 in codegen_build_and_link (g=0x555555a10b20) at zig/src/codegen.cpp:10313
#25 0x00005555555e343d in main (argc=3, argv=0x7fffffffbec8) at zig/src/main.cpp:1351

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorstage1The process of building from source via WebAssembly and the C backend.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions