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: 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.