Bug 193773 - gcc-4.1.1-1.fc5 segfault ICE during compile of valid C++ code on s390x
Summary: gcc-4.1.1-1.fc5 segfault ICE during compile of valid C++ code on s390x
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc   
(Show other bugs)
Version: 5
Hardware: s390x
OS: Linux
high
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-06-01 14:42 UTC by Jason Vas Dias
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-06-21 13:50:35 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
preprocessed c++ 'LocalAccess.cc' source the compiler barfed on (184.23 KB, text/plain)
2006-06-01 14:44 UTC, Jason Vas Dias
no flags Details

Description Jason Vas Dias 2006-06-01 14:42:06 UTC
Description of problem:

During compile of lftp-3.4.7-1.FC5 (current lftp FC-5 CVS version) on s390x,
gcc dumps core with an 'Internal Compiler Error' on a compile that succeeds on
all other platforms:

gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/usr/include
-I/usr/kerberos/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -Wall -Wwrite-strings
-Woverloaded-virtual -fno-exceptions -fno-rtti -MT LocalAccess.lo -MD -MP -MF
.deps/LocalAccess.Tpo -c LocalAccess.cc -o LocalAccess.o
LocalAccess.cc: In member function âvirtual int LocalGlob::Do()â:
LocalAccess.cc:728: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccxAvobN.out file, please attach this to
your bugreport.

I'm now attaching the preprocessed source file requested in the error message.

Version-Release number of selected component (if applicable):
gcc-4.1.1-1.fc5

How reproducible:
100%

Steps to Reproduce:
try to compile the attached preprocessed c++ source on s390x
  
Actual results:
ICE / segfault / core dump

Expected results:
compile succeeds

Comment 1 Jason Vas Dias 2006-06-01 14:44:29 UTC
Created attachment 130347 [details]
preprocessed c++ 'LocalAccess.cc' source the compiler barfed on

Comment 2 Jason Vas Dias 2006-06-01 14:46:27 UTC
The same code was compiled OK by FC-6's gcc-4.1.1-1 on s390x . 
Could be a build server problem ?
 


Comment 3 Jason Vas Dias 2006-06-01 15:55:26 UTC
More info - just removing the '-fno-exceptions' flag allows the compile to
succeed. It seems the RPM OPTFLAGS on FC-5 s390x are now:
'-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64bash-3.1'

But the Makefile for lftp specifies '-fno-exceptions' .
gcc also suffers an ICE and segfault without the '-fexceptions' and with only
the '-fno-exceptions', as well as with  '-fexceptions ... -fno-exceptions'.

I don't think any combination of command line args should cause gcc to segfault,
especially as the gcc compiles the same source with the same args OK on s390x FC6.

Is there some problem with using '-fno-exceptions' on FC-5 s390x ? 
I can try removing the flag from the lftp build.

Comment 4 Jason Vas Dias 2006-06-01 16:39:33 UTC
OK, I tried to work around the problem by patching lftp not to specify
'-fno-exceptions'. This then successfuly built the RPMs manually in /tmp
on the s390x build server, but failed during the build system run with a
different error :

s390x-redhat-linux-gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include
-I/usr/include -I/usr/kerberos/include -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4
-m64 -Wall -Wwrite-strings -Woverloaded-virtual -fno-rtti -MT CmdExec.lo -MD -MP
-MF .deps/CmdExec.Tpo -c CmdExec.cc  -fPIC -DPIC -o .libs/CmdExec.o
CmdExec.cc: In member function 'void CmdExec::beep_if_long()':
CmdExec.cc:939: warning: ignoring return value of 'ssize_t write(int, const
void*, size_t)', declared with attribute warn_unused_result
CmdExec.cc: In function 'void __static_initialization_and_destruction_0(int, int)':
CmdExec.cc:1344: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.


But gcc did not save the preprocessed source this time.

This seems to have been a transient fault (it did not occur with a 
manual build).

All is definitely not well with gcc-4.1.1-1.fc5 on s390x! Please fix - thanks!

Comment 6 Jason Vas Dias 2006-06-01 17:33:59 UTC
Yes, this is a very weird problem, but it
 IS 100% reproducible.

Apparently, it does NOT happen with the preprocessed source, but only when
preprocessing source from the .cc file:

bash-3.1# hostname
spud.z900.redhat.com
bash-3.1# uname -a
Linux spud.z900.redhat.com 2.6.9-24.EL #1 SMP Wed Nov 30 18:16:22 EST 2005 s390x
s390x s390x GNU/Linux
bash-3.1# pwd
/tmp/lftp/FC-5/lftp-3.4.7/src
bash-3.1# rpm -q gcc
gcc-4.1.1-1.fc5
bash-3.1# gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/usr/include
-I/usr/kerberos/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -Wall -Wwrite-strings
-Woverloaded-virtual -fno-exceptions -fno-rtti -MT LocalAccess.lo -MD -MP -MF
.deps/LocalAccess.Tpo -c LocalAccess.cc -o LocalAccess.o
LocalAccess.cc: In member function âvirtual int LocalGlob::Do()â:
LocalAccess.cc:617: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccpnwbdd.out file, please attach this to
your bugreport.
bash-3.1# cp -fp /tmp/ccpnwbdd.out /tmp/ccpnwbdd.cc
bash-3.1# gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/usr/include
-I/usr/kerberos/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -Wall -Wwrite-strings
-Woverloaded-virtual -fno-exceptions -fno-rtti -MT LocalAccess.lo -MD -MP -MF
.deps/LocalAccess.Tpo -c /tmp/ccpnwbdd.cc -o LocalAccess.o
bash-3.1# echo $?
0

And ONLY when the -fno-exceptions flag is specified:

bash-3.1# gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/usr/include
-I/usr/kerberos/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -Wall -Wwrite-strings
-Woverloaded-virtual -fno-rtti -MT LocalAccess.lo -MD -MP -MF
.deps/LocalAccess.Tpo -c LocalAccess.cc -o LocalAccess.o
bash-3.1# echo $
0

But if I don't specify -fno-exceptions for the build, it fails elsewhere, as
for CmdExec.cc above.





Note You need to log in before you can comment on or make changes to this bug.