Request for reviews (S): 7125136: SIGILL on linux amd64 in gc/ArrayJuggle/Juggle29
Vladimir Kozlov
vladimir.kozlov at oracle.com
Mon Feb 13 20:02:46 PST 2012
http://cr.openjdk.java.net/~kvn/7125136/webrev
7125136: SIGILL on linux amd64 in gc/ArrayJuggle/Juggle29
Saving RBP register on nmethod's entry broke nmethod's verified entry patching
when it become non-entrant. There is big comment in MachPrologNode::emit() about
first instruction which should be at lest 5 bytes long. And push(rbp) is one
byte instruction. VerifyFPU code also broken (first instruction is pushf). The
same with C1 generated code with VerifyFPU and C1Breakpoint.
The only reason we did not noticed this until now is stack bang instruction is
usually generated first and it is big (store to stack with big offset). But C2
does not generated it if compiled stack frame is small and no calls in compiled
method.
For C2 moved saving EBP after ESP adjustment. And other cleanup in prolog code.
For C1 generated stack bang with small offset (-256) first if needed.
Verified by examining generated code.
SPARC code is safe since we generate 1 instruction (load from 0) for patching
and use signal handler.
Thanks,
Vladimir
More information about the hotspot-compiler-dev
mailing list