https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91438
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs-bisection | --- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> --- I've got it: Program received signal SIGSEGV, Segmentation fault. 0x08a4dec7 in lookup_page_table_entry (p=0xa5a5a5a5) at ../../gcc/ggc-page.c:641 641 return base[L1][L2]; (gdb) bt #0 0x08a4dec7 in lookup_page_table_entry (p=0xa5a5a5a5) at ../../gcc/ggc-page.c:641 #1 0x08a4ebcb in ggc_set_mark (p=0xa5a5a5a5) at ../../gcc/ggc-page.c:1531 #2 0x08d86715 in gt_ggc_mx_symtab_node (x_p=0xb61b39f0) at gtype-desc.c:1302 #3 0x08d86ad8 in gt_ggc_mx_symtab_node (x_p=0xb6347ee8) at gtype-desc.c:1353 #4 0x085b1388 in gt_ggc_mx_lang_tree_node (x_p=0xb6172080) at ./gtype-ada.h:287 #5 0x08d8475e in gt_ggc_mx_rtx_def (x_p=0xb42e43c0) at gtype-desc.c:717 #6 0x08bd216d in gt_ggc_mx (x_r=...) at ./gt-dwarf2out.h:286 #7 0x08bde122 in gt_ggc_mx<dw_attr_struct> (v=0xb463e180) at ../../gcc/vec.h:1317 #8 0x08bd210a in gt_ggc_mx_vec_dw_attr_node_va_gc_ (x_p=0xb463e180) at ./gt-dwarf2out.h:274 #9 0x08bd19d4 in gt_ggc_mx_die_struct (x_p=0xb62dd030) at ./gt-dwarf2out.h:45 #10 0x08bd1a0c in gt_ggc_mx_die_struct (x_p=0xb44d4990) at ./gt-dwarf2out.h:47 #11 0x08bd2264 in gt_ggc_mx (x_r=...) at ./gt-dwarf2out.h:314 #12 0x08bde122 in gt_ggc_mx<dw_attr_struct> (v=0xb44e8f00) at ../../gcc/vec.h:1317 #13 0x08bd210a in gt_ggc_mx_vec_dw_attr_node_va_gc_ (x_p=0xb44e8f00) at ./gt-dwarf2out.h:274 #14 0x08bd19d4 in gt_ggc_mx_die_struct (x_p=0xb44e5cc0) at ./gt-dwarf2out.h:45 #15 0x08bd1b60 in gt_ggc_mx (x=@0xb44f5004: 0xb44e5cc0) at ./gt-dwarf2out.h:81 #16 0x08be9e0f in ggc_remove<die_struct*>::ggc_mx (p=@0xb44f5004: 0xb44e5cc0) at ../../gcc/hash-traits.h:235 #17 0x08be5796 in ggc_remove<die_struct*>::ggc_maybe_mx (p=@0xb44f5004: 0xb44e5cc0) at ../../gcc/hash-traits.h:242 #18 0x08bd527b in gt_ggc_mx<decl_die_hasher> (h=0xb795b5c0) at ../../gcc/hash-table.h:1166 #19 0x08bd24d7 in gt_ggc_mx_hash_table_decl_die_hasher_ (x_p=0xb795b5c0) at ./gt-dwarf2out.h:395 #20 0x08ce809b in ggc_mark_root_tab (rt=0xa1444e4 <gt_ggc_r_gt_dwarf2out_h+420>) at ../../gcc/ggc-common.c:77 #21 0x08ce8118 in ggc_mark_roots () at ../../gcc/ggc-common.c:94 #22 0x08a4fb36 in ggc_collect () at ../../gcc/ggc-page.c:2201 #23 0x08fd51b7 in execute_one_pass (pass=0xb1ebe60) at ../../gcc/passes.c:2565 #24 0x08fd5204 in execute_pass_list_1 (pass=0xb1ebe60) at ../../gcc/passes.c:2580 #25 0x08fd5280 in execute_pass_list (fn=0xb7a9fea0, pass=0xb1e9690) at ../../gcc/passes.c:2591 #26 0x08b1c7d1 in cgraph_node::expand (this=0xb7b33c6c) at ../../gcc/cgraphunit.c:2194 #27 0x08b1cda5 in expand_all_functions () at ../../gcc/cgraphunit.c:2332 #28 0x08b1d85e in symbol_table::compile (this=0xb794e0d0) at ../../gcc/cgraphunit.c:2688 #29 0x08b1dc6c in symbol_table::finalize_compilation_unit (this=0xb794e0d0) at ../../gcc/cgraphunit.c:2868 #30 0x0911e882 in compile_file () at ../../gcc/toplev.c:481 #31 0x0912122d in do_compile () at ../../gcc/toplev.c:2190 #32 0x09121502 in toplev::main (this=0xbffff45e, argc=38, argv=0xbffff514) at ../../gcc/toplev.c:2325 #33 0x09fa3506 in main (argc=38, argv=0xbffff514) at ../../gcc/main.c:39 The issue is that GGC marker is called for a release node. It happens because of: (gdb) frame 3 #3 0x08d86ad8 in gt_ggc_mx_symtab_node (x_p=0xb6347ee8) at gtype-desc.c:1353 1353 gt_ggc_m_11symtab_node ((*sub).next_nested); where: (gdb) p (*sub).origin $1 = (cgraph_node *) 0x0 So we have a node that has next_nested != NULL && origin == NULL, which is wrong. I've got a patch for it.