Bug 2260321

Summary: ICE/segfault when compiling EFL
Product: [Fedora] Fedora Reporter: Dan Horák <dan>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dmalcolm, fweimer, jakub, jlaw, jwakely, mcermak, mpolacek, msebor, nickc, nixuser, pbrobinson, sipoyare
Target Milestone: ---   
Target Release: ---   
Hardware: aarch64   
OS: Linux   
Whiteboard:
Fixed In Version: gcc-14.0.1-0.3.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-01-26 07:51:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 245418    
Attachments:
Description Flags
preprocessed sources none

Description Dan Horák 2024-01-25 10:07:13 UTC
compiling a source file in the EFL project makes gcc crash with a segfault

Reproducible: Always

Comment 1 Dan Horák 2024-01-25 10:09:08 UTC
Created attachment 2010447 [details]
preprocessed sources

I was doing

<mock-chroot> sh-5.2# gcc -O2 -c ../src/static_libs/draw/draw_convert.i
during RTL pass: split1
../src/static_libs/draw/draw_convert.c: In function ‘efl_draw_argb_premul’:
../src/static_libs/draw/draw_convert.c:591:1: internal compiler error: Segmentation fault
  591 | }
      | ^
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccCFnZ45.out file, please attach this to your bugreport.

Comment 2 Dan Horák 2024-01-25 10:09:35 UTC
gcc-14.0.1-0.2.fc40.aarch64

Comment 3 Dan Horák 2024-01-25 10:18:09 UTC
running under gdb shows

Thread 2.1 "cc1" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xfffff7fea020 (LWP 110)]
0x00000000015b273c in mark_label_nuses (x=0x0) at ../../gcc/emit-rtl.cc:3896
Downloading source file /usr/src/debug/gcc-14.0.1-0.2.fc40.aarch64/obj-aarch64-redhat-linux/gcc/../../gcc/emit-rtl.cc
3896      code = GET_CODE (x);                                                                                                                                                                
(gdb) where
#0  0x00000000015b273c in mark_label_nuses (x=0x0) at ../../gcc/emit-rtl.cc:3896
#1  0x00000000015b27e4 in mark_label_nuses (x=0xfffff3f7aae0) at ../../gcc/emit-rtl.cc:3907
#2  0x00000000015b2788 in mark_label_nuses (x=0xfffff3f7aaf8) at ../../gcc/emit-rtl.cc:3904
#3  0x00000000012a52ec in try_split (pat=<optimized out>, trial=trial@entry=0xfffff3f6a700, last=last@entry=1) at ../../gcc/emit-rtl.cc:4093
#4  0x00000000012a502c in split_insn (insn=insn@entry=0xfffff3f6a700) at ../../gcc/recog.cc:3405
#5  0x00000000012a4df0 in split_all_insns () at ../../gcc/recog.cc:3509
#6  0x000000000173a1f0 in (anonymous namespace)::pass_split_before_regstack::execute (this=<optimized out>) at ../../gcc/recog.cc:4572
#7  0x0000000000e75370 in execute_one_pass (pass=0x23db0e0) at ../../gcc/passes.cc:2646
#8  0x0000000000f44cf0 in execute_pass_list_1 (pass=0x23db0e0) at ../../gcc/passes.cc:2755
#9  execute_pass_list_1 (pass=0x23da300) at ../../gcc/passes.cc:2756
#10 0x0000000000f44494 in execute_pass_list (fn=<optimized out>, pass=<optimized out>) at ../../gcc/passes.cc:2766
#11 0x0000000000fb5bec in cgraph_node::expand (this=0xfffff447d880) at ../../gcc/cgraphunit.cc:1842
#12 0x000000000164bcfc in expand_all_functions () at ../../gcc/cgraphunit.cc:2025
#13 symbol_table::compile (this=0xfffff779c000) at ../../gcc/cgraphunit.cc:2399
#14 0x0000000001648a30 in symbol_table::finalize_compilation_unit (this=0xfffff779c000) at ../../gcc/cgraphunit.cc:2584
#15 0x0000000001627ea4 in compile_file () at ../../gcc/toplev.cc:477
#16 0x00000000015d1f94 in do_compile () at ../../gcc/toplev.cc:2155
#17 toplev::main (this=this@entry=0xfffffffff0a8, argc=<optimized out>, argv=<optimized out>) at ../../gcc/toplev.cc:2313
#18 0x00000000015d1508 in main (argc=<optimized out>, argv=<optimized out>) at ../../gcc/main.cc:39

Comment 4 Jakub Jelinek 2024-01-26 07:51:34 UTC
This should be fixed in rawhide already.