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

Status fields:

creation_ts:2009-06-04 18:58
component:unspecified
version:0.99.4
rep_platform:All
op_sys:Linux
bug_status:RESOLVED
resolution:FIXED
reporter:gnu_andrew@member.fsf.org
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(String.java:1218)
LOG: [0x00007f9160be66f0] Exiting...

Comment #1 by stefan@complang.tuwien.ac.at 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 stefan@complang.tuwien.ac.at on 2009-06-05 08:40:31

Observation 1: -noverify makes it go away

Comment #3 by stefan@complang.tuwien.ac.at 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 stefan@complang.tuwien.ac.at 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 gnu_andrew@member.fsf.org 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 stefan@complang.tuwien.ac.at on 2009-06-05 18:00:46

Created an attachment (id=66)
cacao-no-strict-aliasing.patch

Use this patch.

Comment #7 by gnu_andrew@member.fsf.org on 2009-06-05 18:18:56

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

Comment #8 by gnu_andrew@member.fsf.org on 2009-06-05 18:54:11

Fix summary.

Comment #9 by stefan@complang.tuwien.ac.at on 2010-09-22 09:20:10

http://mips.complang.tuwien.ac.at/hg/cacao/rev/dd4532afd08a

Attachment id=66

date:2009-06-05 18:00
desc:cacao-no-strict-aliasing.patch
type:text/plain
download:cacao-no-strict-aliasing.patch