Is the Java 1.7 / 1.8 JIT compiler broken?

I have a problem with some code from GlazedList 1.8 that causes SIGSEGV when running under java 1.8_05 / 64 bit / FC 20 and Windows 8.

I have parsed output ( -XX:+UnlockDiagnosticVMOptions '-XX:CompileCommand=print,*BoyerMooreCaseInsensitiveTextSearchStrategy.indexOf' see below), but I don’t know how to debug it.

Therefore, any help with code debugging or a hint where to seek help is appreciated.

Collapsible code is more than 30,000 characters. so you will need to https://java.net/jira/browse/GLAZEDLISTS-564?focusedCommentId=378982&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-378982 read the code here

Fatal error detected in Java Runtime Environment:

 SIGSEGV (0xb) at pc=0x00007fdc2d93bcfc, pid=12092, tid=140582414018304 

JRE version: Java (TM) SE runtime (8.0_05-b13) (build 1.8.0_05-b13) Java VM: Java HotSpot (TM) 64-bit server VM (25.5-b02 mixed mode linux-amd64 compressed oops )

Problem frame:

J 12756 C2

ca.odell.glazedlists.impl.filter.BoyerMooreCaseInsensitiveTextSearchStrategy.indexOf (Ljava / languages ​​/ String;) I (147 bytes) @ 0x00007fdc2d93bcfc [0x00007fdc2d93baa0 + 0x25c]

+7
java jvm fatal-error jit
source share
1 answer

This is really a JIT compiler error. I checked that it exists in the JDK 7u67, 8u11, as well as in the latest JDK 9 sources. Here is a test example:

 public class CharArrayCrash { static char[] pattern0 = {0}; static char[] pattern1 = {1}; static void test(char[] array) { if (pattern1 == null) return; int i = 0; int pos = 0; char c = array[pos]; while (i >= 0 && (c == pattern0[i] || c == pattern1[i])) { i--; pos--; if (pos != -1) { c = array[pos]; } } } public static void main(String[] args) { for (int i = 0; i < 1000000; i++) { test(new char[1]); } } } 

The failure occurs in the array access statement where the array offset is illegal (0xffffffff).
It seems that JIT is incorrectly adjusting the decrement and array loading instructions.

Anyway, I sent an error report to Oracle: https://bugs.openjdk.java.net/browse/JDK-8054478

+7
source share

All Articles