-
Bug
-
Resolution: Fixed
-
P2
-
None
-
b42
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8196650 | 11 | Paul Sandoz | P2 | Resolved | Fixed | b01 |
JDK-8197683 | 10u-cpu | Paul Sandoz | P2 | Resolved | Fixed | master |
JDK-8200991 | 10.0.2 | Unassigned | P2 | Resolved | Fixed | b01 |
JDK-8196698 | 10.0.1 | Paul Sandoz | P2 | Resolved | Fixed | b04 |
Some VarHandles expect an Object argument and should throw NullPointerException if null is passed instead. But here's a program that crashes both jdk9 and jdk head:
import static java.lang.invoke.MethodHandles.byteBufferViewVarHandle;
import java.lang.invoke.VarHandle;
import static java.nio.ByteOrder.LITTLE_ENDIAN;
public class Main {
private static final VarHandle vh
= byteBufferViewVarHandle(int[].class, LITTLE_ENDIAN);
public static void main(String[] args) {
try {
vh.get(null, 3);
System.out.println("Not reached");
} catch (NullPointerException success) {}
}
}
==> java -esa -ea Main
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f6d101f0fdc, pid=102300, tid=102301
#
# JRE version: OpenJDK Runtime Environment (10.0) (build 10-internal+0-adhoc.martinrb.jdk)
# Java VM: OpenJDK 64-Bit Server VM (10-internal+0-adhoc.martinrb.jdk, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x781fdc] AccessInternal::PostRuntimeDispatch<G1SATBCardTableLoggingModRefBS::AccessBarrier<401462ul, G1SATBCardTableLoggingModRefBS>, (AccessInternal::BarrierType)3, 401462ul>::oop_access_barrier(oopDesc*, long)+0xc
import static java.lang.invoke.MethodHandles.byteBufferViewVarHandle;
import java.lang.invoke.VarHandle;
import static java.nio.ByteOrder.LITTLE_ENDIAN;
public class Main {
private static final VarHandle vh
= byteBufferViewVarHandle(int[].class, LITTLE_ENDIAN);
public static void main(String[] args) {
try {
vh.get(null, 3);
System.out.println("Not reached");
} catch (NullPointerException success) {}
}
}
==> java -esa -ea Main
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f6d101f0fdc, pid=102300, tid=102301
#
# JRE version: OpenJDK Runtime Environment (10.0) (build 10-internal+0-adhoc.martinrb.jdk)
# Java VM: OpenJDK 64-Bit Server VM (10-internal+0-adhoc.martinrb.jdk, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x781fdc] AccessInternal::PostRuntimeDispatch<G1SATBCardTableLoggingModRefBS::AccessBarrier<401462ul, G1SATBCardTableLoggingModRefBS>, (AccessInternal::BarrierType)3, 401462ul>::oop_access_barrier(oopDesc*, long)+0xc
- backported by
-
JDK-8196650 Crash passing null to a VarHandle
- Resolved
-
JDK-8196698 Crash passing null to a VarHandle
- Resolved
-
JDK-8197683 Crash passing null to a VarHandle
- Resolved
-
JDK-8200991 Crash passing null to a VarHandle
- Resolved