The GCC compiler driver (cc1) crashes with a segfault when trying to compile any simple program #43
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm pretty sure this is some bug/incompatibility somewhere in our libc/kernel/ABI, that is making cc1 behave weirdly. Leaving this open so I can investigate it later.
The actual error (call trace obtained through objdump):
Segfault, null dereference (trying to access 0x8) in
et_splay(et_occ* et)
when trying to accesset->parent
, implying that et is NULL.calculate_dominance_info(cdi_direction)
throughet_set_parent()
cleanup_tree_cfg(unsigned int)
(anonymous namespace)::pass_build_cfg::execute(function*)
execute_one_pass(opt_pass*)
as a function pointer, after accessingin_gimple_form
,global_options
andcfun
execute_pass_list_1(opt_pass*)
execute_pass_list(function*, opt_pass*)
cgraph_node::analyze()
analyze_functions(bool)
symbol_table::finalize_compilation_unit()
compile_file()
toplev::main(int, char**)
main
Crash was due to global constructors not being called, that issue is fixed now. GCC still doesn't work as it apparently hits the top of the stack (not the bottom, this is not a stack overflow, but maybe a buffer overflow) while optimizing SSA passes. At least it gets through a couple of stages now.
Fixed in
644614cdd8
. =DOf course this was not an incompatibility with GCC at all, but a fatal bug in memmove which literally made it work only half of the time and segfault the other half. Glad to see this finally fixed, and GCC finally working on Luna :)