JDK-8004741 : Missing compiled exception handle table entry for multidimensional array allocation
  • Type: Bug
  • Status: Closed
  • Resolution: Fixed
  • Component: hotspot
  • Sub-Component: compiler
  • Priority: P2
  • Affected Version: 6
  • Submit Date: 2012-12-07
  • Updated Date: 2016-04-18
  • Resolved Date: 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 Availabitlity Release.

To download the current JDK release, click here.
JDK 6 JDK 7 JDK 8
6u51Resolved 7u40Fixed 8Fixed
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.
2012-12-20

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.
2012-12-07