Let’s look at the following Java code.
public class Main
{
public static void main(String[] args) throws IOException
{
PathDasher p = new PathDasher(null) ;
}
}
When I tried the above code in Java 6, fetal errors detected as below.
run:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d9add45, pid=1588, tid=3808
#
# JRE version: 6.0_21-b07
# Java VM: Java HotSpot(TM) Client VM (17.0-b17 mixed mode, sharing windows-x86 )
# Problematic frame:
# V [jvm.dll+0xfdd45]
#
# An error report file with more information is saved as:
# E:\Project\FunnyName\hs_err_pid1588.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)
Does it cause JVM to creah?
If this is the code, http://www.dei.unipd.it/ricerca/gmee/MeLa/MeLa/test/source/sun/dc/pr/PathDasher.java it appears that passing
nullis passed to a native method which could crash the JVM if it doesn’t handle it correctly.