RFR(S): 8054224: Recursive method that was compiled by C1 is unable to catch StackOverflowError

Roland Westrelin roland.westrelin at oracle.com
Wed Aug 13 08:38:58 UTC 2014

Thanks for the review Vladimir & Igor.

Vladimir: I tried to run the test with a client VM and it runs fine.


On Aug 12, 2014, at 7:11 PM, Igor Veresov <igor.veresov at oracle.com> wrote:

> Looks good.
> igor
> On Aug 12, 2014, at 1:40 AM, Roland Westrelin <roland.westrelin at oracle.com> wrote:
>> http://cr.openjdk.java.net/~roland/8054224/webrev.00/
>> When processing a StackOverflowError, a call to SharedRuntime::compute_compiled_exc_handler() triggers another StackOverflowError which replaces the current exception and causes the frame to be unwounded. The exception cache is wrongly updated to record that a StackOverflowError at this pc should be handled by unwinding the stack. When the StackOverflowError propagates to the caller (same method at same pc), the caller unwinds when it should jump to the exception handler. Fixed by setting the exception cache only when the exception wasn’t replaced using the same check opto/runtime.cpp does.
>> Roland.

More information about the hotspot-compiler-dev mailing list