JDK-6910605 : C2: NullPointerException/ClassCaseException is thrown when C2 with DeoptimizeALot is used
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs16,7
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-12-15
  • Updated: 2012-11-21
  • Resolved: 2010-03-02
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.
JDK 6 JDK 7 Other
6u21Fixed 7Fixed hs17Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
NullPointerException/ClassCaseException is thrown when C2/DeoptimizeALot is used.
 http://sqeweb.sfbay/nfs/results/vm/gtee/JDK7/NIGHTLY/VM/2009-12-13/Comp_Baseline/vm/linux-amd64/server/comp/linux-amd64_server_comp_nsk.coverage.testlist/analysis.html
 http://sqeweb.sfbay/nfs/results/vm/gtee/JDK7/NIGHTLY/VM/2009-12-13/Comp_Baseline/vm/linux-amd64/server/comp/linux-amd64_server_comp_nsk.coverage.testlist/analysis.html

Affected tests:
nsk/coverage/runtime/runtime003
nsk/coverage/runtime/runtime004
nsk/coverage/runtime/runtime005
nsk/coverage/runtime/runtime006
nsk/coverage/runtime/runtime007

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/f516d5d7a019
20-11-2012

PUBLIC COMMENTS Problem: Regression after 6603492: "multianewarray should generate same code as anewarray for 1-d arrays". After deoptimization interpreter will continue execution after _multianewarray even if compiled code did not allocate all needed arrays. Solution: Set the reexecute bit for runtime calls _new_array_Java so the interpreter will reexecute the _multianewarray bytecode if deoptimization happens. Do it unconditionally even for one dimension multianewarray. Aso I replaced "expand_count == 1" check with "ndimensions == 1" otherwise with MultiArrayExpandLimit=0 we hit ShouldNotReachHere() in case of one dimension multianewarray because the method expand_multianewarray() will not be called. And I removed annoying "reexecute=false" from PcDesc output. Added regression test copied from nsk/coverage/runtime/runtime007
09-02-2010

EVALUATION Regression after 6603492: multianewarray should generate same code as anewarray for 1-d arrays. After deoptimization interpreter will continue execution after _multianewarray even if compiled code did not allocate all needed arrays.
06-02-2010