IV82902: JAVA JIT - INCORRECT COMPARISION RESULTS ON X86 CPUS
Closed as program error.
Error Message: Incorrect behavior in ICU4J. . Stack Trace: N/A . The problem can only occur on X86 (Linux/Windows on AMD or Intel CPUs) and we have only seen the problem on Java8. The failing test-case did not hit the problem in Java6 or Java7, but we believe that the problem is possible but much more difficult to encounter then it is in Java8. The result of the issue could in theory surface in many ways, but incorrect behavior is the most likely result and is how it was seen in the ICU4J scenario where the problem was first discovered.
The problem can be avoided with almost no performance impact by setting/exporting the following environment variable: TR_disableNoTestEFlags=1
The JIT may fail to generate a "test/cmp" instruction when a previous instruction sets the right flag register bits to direct a "jmp" instruction, but the previous instruction was working against a register width that the "jmp" was not meant to react against. i.e. A "shr" instruction working against rdi where the comparison should have been against a byte (dil). Using the flags set by the "shr" might cause the "jmp" instruction to behave in a way that the Java code was not intending. A "test/cmp" instruction against "dil" is requited in such cases.
The JIT was modified such that the register width is considered when determining if a "test/cmp" instruction is needed when previous instructions have already set the conditions flags that the "test/cmp" instruction would set. . This APAR will be fixed in the following Java Releases: 8 SR3 (126.96.36.199) 6 R1 SR8 FP25 (188.8.131.52) 6 SR16 FP25 (184.108.40.206) 7 SR9 FP40 (220.127.116.11) 7 R1 SR3 FP40 (18.104.22.168) . Contact your IBM Product's Service Team for these Service Refreshes and Fix Packs. For those running stand-alone, information about the available Service Refreshes and Fix Packs can be found at: https://www.ibm.com/developerworks/java/jdk/
Reported component name
Reported component ID
NoSpecatt / Xsystem
Last modified date
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fixed component name
Fixed component ID
Applicable component levels