Updated Request for Review(S): JVM crashes when throwing StackOverflow exception from interpreter

Bertrand Delsart bertrand.delsart at oracle.com
Fri Dec 16 09:18:36 PST 2011

Hi Yang (and reviewers),

Here is the updated webrev for approval.


As stated previously, I updated the comments to try to avoid confusion
and modified the code so that the stub address is available at code 
generation time.

In addition, I noticed two other minor issues:
- removed useless setting of saved_exception_pc (which was
   necessary only for the old InterpreterRuntime call) on sparc.
- fixed the @run class name in StackOverflow.java

Code has been tested for C1 and C2, including with WalkStackALot and 
VerifyStack stress options.

Thanks again for your help... and sorry for the confusion around C2 and 
C1 differences.


On 11/16/11 06:04 PM, Wang, Yang wrote:
> Hi folks,
> We found two problems during throwing an StackOverflow exception from
> interpreter.
> 1.Before preparing to throw a StackOverflow exception, the last Java
> frame is set to the current sp. This is problematic when the
> StackOverflow is thrown on top of c2i adapter. Solution : the real
> caller frame(unextended sp) should be set as last Java frame.
> 2.When Garbage collection happens during throwing StackOverflow
> exception, and callee-saved register(or "never-saved" register which
> behaves alike) happens to be an OOP, GC is unable to locate the OOP in C
> frame(generated by VM calls), and hence fails to process the OOP.
> Solution : We build a runtime stub frame before doing a VM call, which
> guarantees the location of Callee-saved registers are always
> recognizable by GC.
> Detailed descriptions and tests could be found in webrev
> http://www.sapjvm.com/yw/webrevs/StackOverflow_GC_Crash/
> I don’t have a bugID yet. Please kindly open one bug for this issue.
> Thanks,
> Yang
> *Yang Wang
> *Software Engineer
> TIP Core AS&VM Technology (AG)*
> *SAP JVM JIT Compiler//
> *SAP AG**
> *Dietmar-Hopp-Allee 16
> 69190 Walldorf, Germany**
> T +49 6227 7-50320*
> *F +49 6227 78-48541*
> *Email : yang02.wang at sap.com*
> *www.sap.com
> *
> *Pflichtangaben/Mandatory Disclosure Statements:
> http://www.sap.com/company/legal/impressum.epx*
> *Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige
> vertrauliche Informationen enthalten. Sollten Sie diese E-Mail
> irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts,
> eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt.
> Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail.
> Vielen Dank. *
> *This e-mail may contain trade secrets or privileged, undisclosed, or
> otherwise confidential information. If you have received this e-mail in
> error, you are hereby notified that any review, copying, or distribution
> of it is strictly prohibited. Please inform us immediately and destroy
> the original transmittal. Thank you for your cooperation.

Bertrand Delsart,               bertrand.delsart at oracle.com,
Sun-Oracle France, 180 av. de l'Europe, ZIRST de Montbonnot,
38334 Saint Ismier,                                  FRANCE

More information about the hotspot-compiler-dev mailing list