RFR(S): 8166689: PPC64: Race condition between stack bang and non-entrant patching

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Mon Sep 26 09:16:21 UTC 2016


Hi Martin,

Good catch!
I wondered whether CodeOffsets::Frame_Complete is still set properly,
but that's set in shared code after calling build_frame. So the fix is good.

Thanks also for fixing the better byte behavior issue.

Best regards,
  Goetz.

From: hotspot-compiler-dev [mailto:hotspot-compiler-dev-bounces at openjdk.java.net] On Behalf Of Doerr, Martin
Sent: Montag, 26. September 2016 10:46
To: hotspot-compiler-dev at openjdk.java.net
Subject: RFR(S): 8166689: PPC64: Race condition between stack bang and non-entrant patching

Hi,

I found a race condition between stack bang and non-entrant patching on linux PPC64.

The signal handler on linux PPC64 investigates the instruction when a stack bang has hit the protected zone. Another thread may patch the verified entry point preventing the signal handler from recognizing the stack overflow.
This problem can be prevented by rearranging C1's prolog code such that the stack bang instruction will never be at the verified entry point. C2's prolog code is already implemented accordingly.

My proposed fix is here:
http://cr.openjdk.java.net/~mdoerr/8166689_PPC64_C1_stackbang/webrev.00/

I have also fixed a missing RewriteControl check in the template interpreter on PPC64.

Please review.

Thanks and best regards,
Martin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160926/da536ee2/attachment.html>


More information about the hotspot-compiler-dev mailing list