We're updating the issue view to help you get more done. 

PowerPC optimizing compiler generates wrong code for the PPC_ORC and PPC_ORCr operators

Description

Original title: Illegal instruction when executing the O0-compiled method gnu.java.security.hash.MD5.transform(..) on ppc32-linux

Running lusearch from dacapo-2006-MR2 leads to various errors on the PPC platform I have access ot. One of those errors occurs when running lusearch in non-adaptive mode and compiling all methods on O0. The Jikes RVM crashes with an error message similar to the following:

mem=0x61839b9c
fp=0x621367d0
tr=0x6103d40c
trap/exception: type=Illegal instruction
ip=0x61839b9c
instr=0x7e30999c
exn_handler=0x55985828
lr=0x61839ee4
pthread_self=0x4ebff480
JikesRVM: internal error trap
JikesRVM: internal error: recursive use of hardware exception registers in thread 0x6103d40c (exiting)
– Stack –
(0x62136764 11222) at [0x62136764, 0x61839ba0] Lorg/jikesrvm/runtime/RuntimeEntrypoints; deliverHardwareException(II)V at line 732
(0x621367c4 1) at [0x621367c4, 0x61839ba0] <hardware trap>
(0x621367d0 19389) at [0x621367d0, 0x61835904] Lgnu/java/security/hash/MD5; transform([BI)V
(0x62136838 19388) at [0x62136838, 0x6180f9fc] Lgnu/java/security/hash/BaseHash; update([BII)V at line 121
(0x62136880 19386) at [0x62136880, 0x61805910] Lgnu/java/security/hash/BaseHash; digest()[B at line 135
at [0x62136880, 0x61805910] Lgnu/java/security/hash/MD5; selfTest()Z at line 366
(0x62136898 19384) at [0x62136898, 0x61834170] Lgnu/java/security/hash/HashFactory; getInstance(Ljava/lang/StringLgnu/java/security/hash/IMessageDigest; at line 105
(0x621368b0 19383) at [0x621368b0, 0x55577bb0] Lgnu/java/security/jce/hash/MessageDigestAdapter; <init>(Ljava/lang/StringV at line 77
at [0x621368b0, 0x55577bb0] Lgnu/java/security/jce/hash/MD5Spi; <init>()V at line 52
at [0x621368b0, 0x55577bb0] Lorg/jikesrvm/classloader/ReflectionBase$$Reflect33717; invokeInternal(Ljava/lang/Object;[Ljava/lang/ObjectLjava/lang/Object;
(0x621368c8 12485) at [0x621368c8, 0x556a8784] Lorg/jikesrvm/runtime/ReflectionBase; invoke(Lorg/jikesrvm/classloader/RVMMethod;Ljava/lang/Object;[Ljava/lang/ObjectLjava/lang/Object; at line 180
(0x62136918 14625) at [0x62136918, 0x555d43d0] Lorg/jikesrvm/runtime/Reflection; invoke(Lorg/jikesrvm/classloader/RVMMethod;Lorg/jikesrvm/runtime/ReflectionBase;Ljava/lang/Object;[Ljava/lang/Object;Z)Ljava/lang/Object; at line 74
(0x62136960 19064) at [0x62136960, 0x61c0e3ac] Ljava/lang/reflect/VMCommonLibrarySupport; construct(Lorg/jikesrvm/classloader/RVMMethod;Ljava/lang/reflect/Constructor;[Ljava/lang/Object;Lorg/jikesrvm/classloader/RVMClass;Lorg/jikesrvm/runtime/ReflectionBaseLjava/lang/Object; at line 437
(0x621369c0 19380) at [0x621369c0, 0x6180d0b0] Ljava/lang/reflect/VMConstructor; construct([Ljava/lang/Object;Ljava/lang/reflect/ConstructorLjava/lang/Object; at line 88
at [0x621369c0, 0x6180d0b0] Ljava/lang/reflect/Constructor; newInstance([Ljava/lang/ObjectLjava/lang/Object; at line 317
at [0x621369c0, 0x6180d0b0] Lgnu/java/security/Engine; getInstance(Ljava/lang/String;Ljava/lang/String;Ljava/security/Provider;[Ljava/lang/ObjectLjava/lang/Object; at line 210
(0x62136a28 19379) at [0x62136a28, 0x555f61f8] Lgnu/java/security/Engine; getInstance(Ljava/lang/String;Ljava/lang/String;Ljava/security/ProviderLjava/lang/Object; at line 105
(0x62136a38 18026) at [0x62136a38, 0x555f6c64] Ljava/security/MessageDigest; getInstance(Ljava/lang/String;Ljava/security/ProviderLjava/security/MessageDigest; at line 157
(0x62136a90 18024) at [0x62136a90, 0x61856db4] Ljava/security/MessageDigest; getInstance(Ljava/lang/StringLjava/security/MessageDigest; at line 95
(0x62136ad0 19360) at [0x62136ad0, 0x554ec2e4] Lorg/apache/lucene/store/FSDirectory; <clinit>()V at line 97
(0x62136b00 8608) at [0x62136b00, 0x559866c8] Lorg/jikesrvm/classloader/RVMClass; initialize()V at line 1542
(0x62136b40 11219) at [0x62136b40, 0x55977814] Lorg/jikesrvm/runtime/RuntimeEntrypoints; initializeClassForDynamicLink(Lorg/jikesrvm/classloader/RVMClassV at line 610
(0x62136b60 9926) at [0x62136b60, 0x559516d8] Lorg/jikesrvm/classloader/TableBasedDynamicLinker; resolveMember(Lorg/jikesrvm/classloader/MemberReferenceI at line 76
(0x62136b98 12619) at [0x62136b98, 0x55951a64] Lorg/jikesrvm/compilers/opt/runtimesupport/OptLinker; resolveDynamicLink(Lorg/jikesrvm/compilers/opt/runtimesupport/OptCompiledMethod;Lorg/vmmagic/unboxed/OffsetV at line 64
(0x62136be8 1743) at [0x62136be8, 0x6184655c] Lorg/jikesrvm/compilers/opt/runtimesupport/OptSaveVolatile; resolve()V at line 135
(0x62136cd8 19359) at [0x62136cd8, 0x618690cc] Lorg/apache/lucene/index/IndexReader; open(Ljava/lang/StringLorg/apache/lucene/index/IndexReader; at line 127
(0x62136ce8 19358) at [0x62136ce8, 0x6185e448] Ldacapo/lusearch/LusearchHarness$QueryThread; <init>(Ldacapo/lusearch/LusearchHarness;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZLdacapo/lusearch/LusearchHarnessV at line 141
(0x62136d30 19357) at [0x62136d30, 0x6188c618] Ldacapo/lusearch/LusearchHarness; iterate(Ljava/lang/StringV at line 115
(0x62136d88 19352) at [0x62136d88, 0x61884e24] Ldacapo/Benchmark; run(Ldacapo/Callback;Ljava/lang/String;Z)Z at line 126
(0x62136db8 19329) at [0x62136db8, 0x61c0ad24] Ldacapo/TestHarness; runBenchmark(Ljava/io/File;Ljava/lang/String;Ldacapo/TestHarnessV at line 302
(0x62136df8 19273) at [0x62136df8, 0x61846154] Ldacapo/TestHarness; main([Ljava/lang/StringV at line 242
(0x62136e30 19244) at [0x62136e30, 0x5587c6ac] LHarness; main([Ljava/lang/StringV at line 5
(0x62136e40 -1) at [0x62136e40, 0x556a7a00] <invisible method>

The error seems to be caused by the method Lgnu/java/security/hash/MD5; transform([BI)V ; the attached advice file reliably reproduces this error on the PPC system.

Environment

ppc32-linux, Linux rple 3.8.0-0-powerpc-e500mc #2-Ubuntu SMP Sun Jan 13 03:54:50 UTC 2013 ppc ppc ppc GNU/Linux, Jikes RVM revision 041ef563addb (+ build system changes needed for that machine)

Status

Assignee

Erik Brangs

Reporter

Erik Brangs

Labels

None

External issue ID

None

Fix versions

Affects versions

git tip

Priority

Medium