Skip to content

ICE: segfault when no source file is passed #3523

@matthiaskrgr

Description

@matthiaskrgr

Meta

local build @ b4895da

Error output

I tried to run my locally built crab1 but didn't pass a soure file
I got the command from https://github.com/Rust-GCC/gccrs?tab=readme-ov-file#running-gcc-rust
./gcc/crab1 -frust-debug -frust-dump-ast-pretty -Warray-bounds -dumpbase test.rs -mtune=generic -march=x86-64 -O0 -version -fdump-tree-gimple -o test.s -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 -frust-incomplete-and-experimental-compiler-do-not-use -freport-bug
to my surprise this would already cause a segfault 😅

Backtrace

  compiled by GNU C version 14.2.1 20250207, GMP version 6.3.0, MPFR version 4.2.1, MPC version 1.3.1, isl version isl-0.27-GMP

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
options passed: -frust-debug -frust-dump-ast-pretty -mtune=generic -march=x86-64 -O0 -frust-incomplete-and-experimental-compiler-do-not-use -freport-bug
crab1: internal compiler error: Segmentation fault
0x14ffe4f crash_signal
  ../../gcc/toplev.cc:319
0x28b7d36 lrealpath
  ../../libiberty/lrealpath.c:215
0x28b696a canonical_filename_eq
  ../../libiberty/filename_cmp.c:216
0xad732d init_asm_output
  ../../gcc/toplev.cc:707
0xad732d lang_dependent_init
  ../../gcc/toplev.cc:1847
0xad732d do_compile
  ../../gcc/toplev.cc:2139
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions