JDK-8004741 : Missing compiled exception handle table entry for multidimensional array allocation
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2012-12-07
  • Updated: 2016-04-18
  • Resolved: 2012-12-20
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 JDK 8 Other
6u51Fixed 7u40Fixed 8Fixed hs24Fixed
Related Reports
Relates :  
Description
  
SHORT SUMMARY: 
Assert failure: missing exception handler in compiled method.
INDICATORS: 
Internal Error (sharedRuntime.cpp:665), pid=XXXXX, tid=XX guarantee(false) 
failed: missing exception handler
COUNTER INDICATORS: 
None
TRIGGERS: 
None known.
KNOWN WORKAROUND: 
Disable c2 compilation of affected method.
PRESENT SINCE: 
Unknown.
HOW TO VERIFY: 
Error message.
NOTES FOR SE: 
REGRESSION: 
No.
  

Comments
The failure reproduced with VM without fix but with disable exception processing deoptimization (with new flag -XX:+StressCompiledExceptionHandlers) in next jtreg test: compiler/6712835 and new test compiler/8004741 jtreg -testjdk:myjdk8/fastdebug -va -vmoptions:'-server -d64 -XX:-TieredCompilation -XX:+StressCompiledExceptionHandlers' compiler/6712835 compiler/8004741 I hit additional failure when ran compiler regression tests with disable deoptimization (with new flag -XX:+StressCompiledExceptionHandlers) for exceptions processing. 2 tests failed because thrown exception (NegativeArraySizeException) during runtime call was not caught by catch block: compiler/6795161 compiler/6799693 The problem was C2 expected only OutOfMemoryError (which is not Exception) from slow allocation runtime calls. I replaced it with Throwable which C2 uses for other calls. Note, the failure can't be reproduced without instrumenting VM (new flag -XX:+StressCompiledExceptionHandlers) and as result can't verify the fix with promoted builds.
20-12-2012

Day one bug. C2 does not generate exception path for runtime call to allocate multidimensional array. It could case error in sharedRuntime.cpp: "guarantee(false) failed: missing exception handler" The reason we don't see the problem more frequently is because compiled frame is deoptimized when there is an exception on return from runtime call or during safepoint. There is very small interval between exit from safepoint (at the end of JRT_ENTRY scope) and return from _multianewarrayN_C method when exception could be posted and will be processed by wrapper of runtime call.
07-12-2012