Bug 2048223

Summary: internal compiler error: Segmentation fault when building mednafen
Product: [Fedora] Fedora Reporter: Julian Sikorski <belegdol>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: aoliva, dmalcolm, fweimer, jakub, jwakely, law, mpolacek, msebor, nickc, sipoyare
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gcc-12.0.1-0.6.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-06 18:11:43 UTC Type: Bug
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: 2043760    
Attachments:
Description Flags
preprocessed source
none
preprocessed source with annobin plugin disabled none

Description Julian Sikorski 2022-01-30 09:41:19 UTC
Description of problem:
mednafen fails to build on rawhide with the following errors:


Version-Release number of selected component (if applicable):
gcc-c++-12.0.1-0.3.fc36.x86_64

How reproducible:
always

Steps to Reproduce:
1. fedpkg clone mednafen
2. cd mednafen
3. fedpkg mockbuild

Actual results:
build fails

Expected results:
build succeeds

Comment 1 Julian Sikorski 2022-01-30 09:41:50 UTC
Created attachment 1857796 [details]
preprocessed source

Comment 2 Julian Sikorski 2022-01-30 11:27:37 UTC
Here is the actual error:

*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_FINISH_UNIT               | annobin: Generate final annotations
PLUGIN_START_UNIT                | annobin: Generate global annotations
PLUGIN_ALL_PASSES_START          | annobin: Generate per-function annotations
PLUGIN_ALL_PASSES_END            | annobin: Register per-function end symbols
nes/boards/16.cpp: In member function 'int MDFN_IEN_NES::X24C0xP<model, mem_size>::StateAction(Mednafen::StateMem*, int, int, const char*)':
nes/boards/16.cpp:63:3: internal compiler error: Segmentation fault
   63 |   };
      |   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccQxhlqA.out file, please attach this to your bugreport.

https://koji.fedoraproject.org/koji/taskinfo?taskID=82137597

Comment 3 Julian Sikorski 2022-01-30 12:00:50 UTC
Created attachment 1857798 [details]
preprocessed source with annobin plugin disabled

The issue happens with annobin plugin disabled as well:

g++ -std=gnu++11 -fsigned-char -DHAVE_CONFIG_H  -I/usr/include/lzo   -I../include -I../include -I../intl    -fno-fast-math -fno-unsafe-math-optimizations -fno-aggressive-loop-optimizations -fno-ipa-icf -fno-printf-return-value -fomit-frame-pointer -fstrict-aliasing  -Wall -Wshadow -Wempty-body -Wignored-qualifiers -Wvla -Wvariadic-macros -Wdisabled-optimization -Wstack-usage=32768 -Werror=write-strings  -fwrapv -fjump-tables -mfunction-return=keep -mindirect-branch=keep -mno-indirect-branch-register -mcmodel=small  -fexceptions  -fno-pic -fno-pie -fno-PIC -fno-PIE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS    -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,-z,relro -Wl,-z,now -c -o nes/boards/16.o nes/boards/16.cpp
nes/boards/16.cpp: In member function 'int MDFN_IEN_NES::X24C0xP<model, mem_size>::StateAction(Mednafen::StateMem*, int, int, const char*)':
nes/boards/16.cpp:63:3: internal compiler error: Segmentation fault
   63 |   };
      |   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccdPfW8J.out file, please attach this to your bugreport.
make[2]: *** [Makefile:4566: nes/boards/16.o] Error 1

Comment 4 Julian Sikorski 2022-01-30 18:49:36 UTC
gcc-12.0.1-0.4.fc36 is still affected.

Comment 5 Jakub Jelinek 2022-02-04 08:04:13 UTC
Still not fixed in gcc-12.0.1-0.5.fc36 but will be in the next build during the weekend.

Comment 6 Fedora Update System 2022-02-06 17:40:10 UTC
FEDORA-2022-fba9d09417 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-fba9d09417

Comment 7 Fedora Update System 2022-02-06 18:11:43 UTC
FEDORA-2022-fba9d09417 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.