JDK-4331143 : VM throws wrong exception with -Xcomp switch turned on
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_7
  • CPU: generic
  • Submitted: 2000-04-18
  • Updated: 2012-10-08
  • Resolved: 2000-05-25
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.3.0 sol-betaFixed
Related Reports
Relates :  
Description
michael.parks@eng 2000-04-17

verified on Intel only.

If attempting to access an element of 
an uninitialized array using a negative index,
the VM throws an ArrayIndexOutOfBoundException 
instead of a NullPointerException.

The error occurs with java switch "-Xcomp" turned on,
and does not arise if "-Xcomp" is omitted.



Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: kest-sol-beta FIXED IN: kest-sol-beta INTEGRATED IN: kest-sol-beta
14-06-2004

EVALUATION jon.masamitsu@Eng 2000-04-17 The description and the comments in the test say that a NullPointerException should be thrown in both tests. On sparc a NullPointerException is thrown on both tests. arches% which java /usr/java1.3/bin/java arches% java -classpath . ArrayExceptionBug NullPointerException PASS with array index = 0 NullPointerException FAIL with array index = -1 arches% java -Xint -classpath . ArrayExceptionBug NullPointerException PASS with array index = 0 NullPointerException FAIL with array index = -1 arches% java -Xcomp -classpath . ArrayExceptionBug NullPointerException PASS with array index = 0 NullPointerException FAIL with array index = -1 arches% java -version java version "1.3" Java(TM) 2 Runtime Environment, Standard Edition (build Solaris_JDK_1.3-b11) Java HotSpot(TM) Client VM (build 1.3-b11, mixed mode) jon.masamitsu@Eng 2000-04-18 This fails as described on x86. telluride% /usr/java1.3/bin/java -Xint ArrayExceptionBug NullPointerException PASS with array index = 0 NullPointerException FAIL with array index = -1 telluride% ^int^comp /usr/java1.3/bin/java -Xcomp ArrayExceptionBug NullPointerException PASS with array index = 0 ArrayIndexOutOfBoundsException PASS with array index = -1 telluride% /usr/java1.3/bin/java -version java version "1.3" Java(TM) 2 Runtime Environment, Standard Edition (build Solaris_JDK_1.3-b11) Java HotSpot(TM) Client VM (build 1.3-b09, mixed mode) telluride% uname -a SunOS telluride 5.7 Generic_106542-10 i86pc i386 i86pc
11-06-2004