[10] RFR(XS) 8185736: missing default exception handler in calls to rethrow_Stub

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[10] RFR(XS) 8185736: missing default exception handler in calls to rethrow_Stub

Tom Rodriguez-2
http://cr.openjdk.java.net/~never/8185736/webrev
https://bugs.openjdk.java.net/browse/JDK-8185736

C2 exception handler tables must always contain a handler for the bci -1
since exceptions thrown during exception dispatch will attempt to
redispatch the recursive exception at bci -1.  C2's rethrow stub may end
up without a throw to the exit so one must be explicitly inserted to
ensure the VM doesn't abort during dispatch.  This happened reliably
because of a StackOverflowException in a Graal system running R code but
I was unable to build a test case for it.  You can see this missing
catch_pco by inspecting the -XX:+PrintExceptionHandlers output, so the
assert by itself show any place where C2 is exposed to this problem.  I
believe C1 builds it's exception handler tables differently and doesn't
necessarily include a -1 handler since it always contains an unwind
handler entry point which is used when no other handler is specified.

Vladimir ran I believe ran this through RBT.

tom
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [10] RFR(XS) 8185736: missing default exception handler in calls to rethrow_Stub

Vladimir Kozlov
On 8/8/17 1:47 PM, Tom Rodriguez wrote:
> http://cr.openjdk.java.net/~never/8185736/webrev
> https://bugs.openjdk.java.net/browse/JDK-8185736

Looks good.

>
> C2 exception handler tables must always contain a handler for the bci -1
> since exceptions thrown during exception dispatch will attempt to
> redispatch the recursive exception at bci -1.  C2's rethrow stub may end
> up without a throw to the exit so one must be explicitly inserted to
> ensure the VM doesn't abort during dispatch.  This happened reliably
> because of a StackOverflowException in a Graal system running R code but
> I was unable to build a test case for it.  You can see this missing
> catch_pco by inspecting the -XX:+PrintExceptionHandlers output, so the
> assert by itself show any place where C2 is exposed to this problem.  I
> believe C1 builds it's exception handler tables differently and doesn't
> necessarily include a -1 handler since it always contains an unwind
> handler entry point which is used when no other handler is specified.
>
> Vladimir ran I believe ran this through RBT.

Yes, it passed compiler's RBT.

Vladimir

>
> tom
Loading...