RFR(S): 8029873: compiler/uncommontrap/TestStackBangRbp.java crashes with SIGSEGV
vladimir.kozlov at oracle.com
Mon Jan 6 15:13:47 PST 2014
On 1/6/14 6:04 AM, Roland Westrelin wrote:
> Class loading from the uncommon trap blob calls java code which may trigger a stack overflow. If the overflow happens right before the java code returns to the runtime, the stack is left unguarded when we return to the uncommon trap blob. The stack banging in the uncommon trap blob can trigger a new stack overflow and because the stack is not guarded we crash. The fix consists in reguarding the stack after the class loading if needed (deoptimization.cpp).
> The test case doesn’t reproduce this problem (I couldn’t get a test case to do it reliably). It triggers another similar problem. A stack overflow can be propagated to a compiled method while the stack is still unguarded. If the compiled method is marked for deoptimization then we go directly go to the deopt blob. If stack banging in the deopt blob triggers a new stack overflow we crash for the same reason as above. The fix is to reguard the stack before we go to the uncommon blob (sharedRuntime.cpp).
More information about the hotspot-compiler-dev