Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1769718

Summary: internal compiler error in edge_badness
Product: Red Hat Enterprise Linux 7 Reporter: Chen Chen <aflyhorse>
Component: gccAssignee: Marek Polacek <mpolacek>
Status: CLOSED WONTFIX QA Contact: Alexandra Petlanová Hájková <ahajkova>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.8CC: 3548216, fweimer, jakub, law, ohudlick
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-05 15:40:55 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:
Attachments:
Description Flags
Preprocessed source
none
fuzzer.gcda none

Description Chen Chen 2019-11-07 09:52:56 UTC
Created attachment 1633601 [details]
Preprocessed source

Description of problem:

When compile CPython 3.7.5, the following message showed in compile:

/tmp/Python-3.7.5/Modules/_xxtestfuzz/fuzzer.c:177:1: internal compiler error: in edge_badness, at ipa-inline.c:900
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccyapQ6i.out file, please attach this to your bugreport.



Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Download and extract https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tar.xz
2. CFLAGS='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' OPT="-O2 $CFLAGS" ./configure --enable-shared --enable-unicode=ucs4 --with-ensurepip=install --with-system-expat --with-system-ffi --with-system-libmpdec --enable-optimizations --with-lto --with-computed-gotos --with-dbmliborder=gdbm:ndbm:bdb
3. make

Actual results:

internal compiler error
Failed to build these modules:
_xxtestfuzz

Expected results:
Build OK

Additional info:

Comment 2 Marek Polacek 2019-11-07 16:45:46 UTC
I can't reproduce with the provided preprocessed file:

# gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
# gcc -O2 bz1769718.c -c -mtune=generic -march=x86-64 -g -O2 -Wsign-compare -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -std=c99 -fPIC -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -fprofile-use -fprofile-correction
/tmp/Python-3.7.5/Modules/_xxtestfuzz/fuzzer.c: In function ‘LLVMFuzzerTestOneInput’:
/tmp/Python-3.7.5/Modules/_xxtestfuzz/fuzzer.c:177:1: note: file /root/m/bz1769718.gcda not found, execution counts estimated

Are you sure the attached preprocessed file causes the ICE for you?

Comment 3 Chen Chen 2019-11-08 01:43:24 UTC
Yes.

I extracted the gcda from the Python build and it reproduced.
I've no idea what the gcda file is though. I attached it here.
(Seems like a profile thing, I'll try compile python with less config options.)


[root@orion tmp]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)

[root@orion tmp]# cp ccyapQ6i.out bz.c
[root@orion tmp]# cp Python-3.7.5/build/temp.linux-x86_64-3.7/tmp/Python-3.7.5/Modules/_xxtestfuzz/fuzzer.gcda bz.gcda
[root@orion tmp]# gcc -O2 bz.c -c -mtune=generic -march=x86-64 -g -O2 -Wsign-compare -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -std=c99 -fPIC -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -fprofile-use -fprofile-correction
/tmp/Python-3.7.5/Modules/_xxtestfuzz/fuzzer.c:177:1: internal compiler error: in edge_badness, at ipa-inline.c:900
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccE89Aqq.out file, please attach this to your bugreport.

Comment 4 Chen Chen 2019-11-08 01:45:03 UTC
Created attachment 1633833 [details]
fuzzer.gcda

Comment 5 Jeff Law 2020-05-05 15:40:55 UTC
We're only fixing critical issues for RHEL 7 compilers (ie, security issues, incorrect codegen).  We'd recommend disabling profiling feedback to work around this issue.  Alternately you could look to use DTS-8 or DTS-9 which include gcc-8 and gcc-9 respectively.

Comment 6 ho121 2024-03-14 08:19:18 UTC
Try change `PGO_PROF_GEN_FLAG` and `PGO_PROF_USE_FLAG` to empty in Makefile