BZ #129: CACAO fails with gcc 4.4 due to aliasing

Status fields:

creation_ts:2009-06-04 18:58
CACAO + OpenJDK 7 now works on Fedora (see #128), but I still have a failure on Gentoo.
I think this may be due to a newer glibc (2.10)

/mnt/builder/cacao-icedtea/openjdk-ecj/build/linux-amd64/j2sdk-image/bin/java -version
LOG: [0x00007f9160be66f0] We received a SIGSEGV and tried to handle it, but we were
LOG: [0x00007f9160be66f0] unable to find a Java method at:
LOG: [0x00007f9160be66f0]
LOG: [0x00007f9160be66f0] PC=0x00007f915fbdc6b1
LOG: [0x00007f9160be66f0]
LOG: [0x00007f9160be66f0] Dumping the current stacktrace:
        at java.lang.String.<clinit>()V(
LOG: [0x00007f9160be66f0] Exiting...

Comment #1 by on 2009-06-04 20:28:49

I have a Fedora 11 system at work. I will try to run it there tomorrow.

Comment #2 by on 2009-06-05 08:40:31

Observation 1: -noverify makes it go away

Comment #3 by on 2009-06-05 09:16:37

Observation 2: compiling it with gcc 4.3 works. There is a strong smell of a gcc 4.4
optimization bug in the air.

Comment #4 by on 2009-06-05 10:42:33

Observation 3: Building CACAO with gcc 4.4 works with "-O2 -fno-strict-aliasing".

Now it's not easy to decide if the bug is in gcc or CACAO. Aliasing is incredibly muddy,
and the verifier source code is not for the faint of heart, either.

Comment #5 by on 2009-06-05 17:56:46

Any idea how we might build this in to IcedTea? Or do you think there may be a better
solution on the horizon?

Comment #6 by on 2009-06-05 18:00:46

Created an attachment (id=66)

Use this patch.

Comment #7 by on 2009-06-05 18:18:56

Duplicated the bug with IcedTea6 so it affects both.
Trying the patch now.

Comment #8 by on 2009-06-05 18:54:11

Fix summary.

Comment #9 by on 2010-09-22 09:20:10

Attachment id=66

date:2009-06-05 18:00