internal compiler error: in fixup_reorder_chain,, at cfgrtl.c:3336

Bug #1584602 reported by Ming Lei
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-4.8 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When building samba package on trusty/arm64 with gcc-4.8, the following build crash can be observed, and it can be triggered with gcc-4.7 too.

01:07:10 runner /usr/bin/gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4
-Wformat -Werror=format-security -fPIC -D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS --
DSTATIC_LOCKING_MODULES=NULL -DSTATIC_LOCKING_MODULES_PROTO=extern
void __LOCKINN
G_dummy_module_proto(void) -MD -D_FORTIFY_SOURCE=2 -Idefault/source3
-I../sourcee
3 -Idefault/source3/include -I../source3/include -Idefault/source3/lib
-I../sourr
ce3/lib -Idefault/source4/heimdal/lib/com_err
-I../source4/heimdal/lib/com_err --
Idefault/source4/heimdal/lib/krb5 -I../source4/heimdal/lib/krb5
-Idefault/sourcee
4/heimdal/lib/gssapi -I../source4/heimdal/lib/gssapi
-Idefault/source4/heimdal_bb
uild -I../source4/heimdal_build
-Idefault/bin/default/source4/heimdal/lib/asn1 --
Idefault/source4/heimdal/lib/asn1 -Idefault/include/public
-I../include/public --
Idefault/source4 -I../source4 -Idefault/lib -I../lib
-Idefault/source4/lib -I..//
source4/lib -Idefault/source4/include -I../source4/include
-Idefault/include -I..
./include -Idefault/lib/replace -I../lib/replace -Idefault -I..
-Idefault/librpcc
 -I../librpc -Idefault/libcli/security -I../libcli/security
-Idefault/source3/lii
brpc -I../source3/librpc -Idefault/libcli/util -I../libcli/util
-Idefault/lib/utt
il/charset -I../lib/util/charset -Idefault/dynconfig -I../dynconfig
-Idefault/lii
b/compression -I../lib/compression -Idefault/libcli/nbt
-I../libcli/nbt -Idefaull
t/lib/crypto -I../lib/crypto -I/usr/local/include -D_SAMBA_BUILD_=4
-DHAVE_CONFII
G_H=1 -D_GNU_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 ../source3/locking/brlock.c -c
-o default/source3/locking/brlock_92.o
../source3/smbd/notify.c: In function ‘change_notify_create’:
../source3/smbd/notify.c:297:1: internal compiler error: in
fixup_reorder_chain,,
 at cfgrtl.c:3336
../source3/smbd/notify.c: In function ‘change_notify_create’:
../source3/smbd/notify.c:297:1: internal compiler error: in
fixup_reorder_chain,,
 at cfgrtl.c:3336
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.

Revision history for this message
Ming Lei (tom-leiming) wrote :

Follos the steps to reproduce the issue:

1, find a arm64 machine or VM, which is installed trusty

2, prepare for building samba:
sudo apt-get -y install dpkg-dev fakeroot
sudo apt-get -y build-dep samba

3, download the following samba source:
wget https://launchpad.net/ubuntu/+archive/primary/+files/samba_4.3.9+dfsg.orig.tar.xz
wget https://launchpad.net/ubuntu/+archive/primary/+files/samba_4.3.9+dfsg-0ubuntu0.14.04.1.debian.tar.gz
wget https://launchpad.net/ubuntu/+archive/primary/+files/samba_4.3.9+dfsg-0ubuntu0.14.04.1.dsc

4, start the building:

dpkg-source -x samba_4.3.9+dfsg-0ubunntu0.14.04.1.dsc
cd samba-4.3.9+dfsg
fakeroot debian/rules clean;
CONCURRENCY_LEVEL=`getconf _NPROCESSORS_ONLN` fakeroot debian/rules binary

5, then the gcc crash can be observed

Thanks,

description: updated
Revision history for this message
Steve Langasek (vorlon) wrote :

Hi Tom,

Can you please help us isolate a reduced test case for this issue, preferably with a single preprocessed source file and a minimal set of gcc flags necessary to reproduce it?

Revision history for this message
Ming Lei (tom-leiming) wrote :

Please see the gcc-4.8 crash log on trusty/arm64, which includes the gcc flag and PreprocessedSource.

Revision history for this message
Matthias Klose (doko) wrote :

workaround is to build the file with -fno-if-conversion.

Revision history for this message
Matthias Klose (doko) wrote :

$ cat notify.i
_Bool a;
fn1(unsigned int p1) {
  unsigned int b = a ? p1 : 0;
  if (p1 || b)
    fn2(0, p1, b);
}
$ gcc -c -O1 -fno-if-conversion notify.i
$ gcc -c -O1 notify.i
notify.i: In function 'fn1':
notify.i:6:1: internal compiler error: in fixup_reorder_chain, at cfgrtl.c:3336
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.

still seen in 4.8.5 (16.04), doesn't show in 4.9 (and gcc-snapshot in trusty)

Ming Lei (tom-leiming)
Changed in gcc-4.8 (Ubuntu):
status: New → Confirmed
Revision history for this message
Andrew Cloke (andrew-cloke) wrote :

I've raised https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1585174 to highlight the issue and suggest using the "-fno-if-conversion" option that Matthias has identifed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.