Mercurial > hg > graal-compiler
comparison src/cpu/x86/vm/templateInterpreter_x86_32.cpp @ 4743:dca455dea3a7
7116216: StackOverflow GC crash
Summary: GC crash for explicit stack overflow checks after a C2I transition.
Reviewed-by: coleenp, never
Contributed-by: yang02.wang@sap.com, bertrand.delsart@oracle.com
author | bdelsart |
---|---|
date | Tue, 20 Dec 2011 12:33:05 +0100 |
parents | b20d64f83668 |
children | 22cee0ee8927 |
comparison
equal
deleted
inserted
replaced
4742:8fdf463085e1 | 4743:dca455dea3a7 |
---|---|
520 __ cmpptr(rsp, rax); | 520 __ cmpptr(rsp, rax); |
521 __ jcc(Assembler::above, after_frame_check_pop); | 521 __ jcc(Assembler::above, after_frame_check_pop); |
522 | 522 |
523 __ pop(rsi); // get saved bcp / (c++ prev state ). | 523 __ pop(rsi); // get saved bcp / (c++ prev state ). |
524 | 524 |
525 __ pop(rax); // get return address | 525 // Restore sender's sp as SP. This is necessary if the sender's |
526 __ jump(ExternalAddress(Interpreter::throw_StackOverflowError_entry())); | 526 // frame is an extended compiled frame (see gen_c2i_adapter()) |
527 | 527 // and safer anyway in case of JSR292 adaptations. |
528 | |
529 __ pop(rax); // return address must be moved if SP is changed | |
530 __ mov(rsp, rsi); | |
531 __ push(rax); | |
532 | |
533 // Note: the restored frame is not necessarily interpreted. | |
534 // Use the shared runtime version of the StackOverflowError. | |
535 assert(StubRoutines::throw_StackOverflowError_entry() != NULL, "stub not yet generated"); | |
536 __ jump(ExternalAddress(StubRoutines::throw_StackOverflowError_entry())); | |
528 // all done with frame size check | 537 // all done with frame size check |
529 __ bind(after_frame_check_pop); | 538 __ bind(after_frame_check_pop); |
530 __ pop(rsi); | 539 __ pop(rsi); |
531 | 540 |
532 __ bind(after_frame_check); | 541 __ bind(after_frame_check); |