JDK-4007663 : generation of code considered by the verifier as incorrect
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.0.2,1.1
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_2.4
  • CPU: sparc
  • Submitted: 1996-10-07
  • Updated: 1996-10-11
  • Resolved: 1996-10-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.1 1.1Fixed
Related Reports
Relates :  
Description

Name: swC45995			Date: 10/07/96


The verifier catches an assignment to a nonextisting array component before
execution and by doing so prevents the subsequent execution. This takes place
only for arrays of reference types. For example, of the following test

public class test
{
	public static void main(String argv[])
	{
		test [] a = null, b;

		b = a;
		b[0] = new test();
	}
}

with the -verify option produces verifier diagnostics:

novo40% java -verify test
VERIFIER ERROR test.main([Ljava/lang/String;)V:
Incompatible types for storing into array of arrays or objects
Can't find class test

while its execution without this option produces the right output:

novo40% java test
java.lang.NullPointerException
	at test.main(test.java:8)

======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.1 FIXED IN: 1.1 INTEGRATED IN: 1.1 VERIFIED IN: 1.1
14-06-2004

EVALUATION This appears to have been fixed in the latest JDK1.1 workspace. % cat java/test.java public class test { public static void main(String argv[]) { test [] a = null, b; b = a; b[0] = new test(); } } % ${ws}/build/bin/javac -d ./classes java/test.java % ${ws}/build/bin/java -classpath ./classes:${workspace}/build/classes test java.lang.NullPointerException at test.main(test.java:8) % ${ws}/build/bin/java -verify -classpath ./classes:${workspace}/build/classes test java.lang.NullPointerException at test.main(test.java:8) % peter.kessler@Eng 1996-10-11
11-10-1996

PUBLIC COMMENTS Verifier gives error instead of letting erroneous program run. peter.kessler@Eng 1996-10-11
11-10-1996