Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/graphKit.cpp @ 1593:2458a1f25356
6953058: G1: A bigapp crashes with SIGSEGV in compiled code
Summary: In C2's G1 post write barrier, the loads of the buffer and index fields from the DirtyCardQueue structure may be moved across a safepoint. Use the current value of "control" in the C2 IR to limit how far these loads can move.
Reviewed-by: never, iveresov, kvn
author | johnc |
---|---|
date | Mon, 07 Jun 2010 17:46:04 -0700 |
parents | b4776199210f |
children | b9bc732be7c0 |
comparison
equal
deleted
inserted
replaced
1592:5b77884bd4b7 | 1593:2458a1f25356 |
---|---|
3485 | 3485 |
3486 IdealKit ideal(gvn(), control(), merged_memory(), true); | 3486 IdealKit ideal(gvn(), control(), merged_memory(), true); |
3487 | 3487 |
3488 Node* tls = __ thread(); // ThreadLocalStorage | 3488 Node* tls = __ thread(); // ThreadLocalStorage |
3489 | 3489 |
3490 Node* no_ctrl = NULL; | |
3491 Node* no_base = __ top(); | 3490 Node* no_base = __ top(); |
3492 float likely = PROB_LIKELY(0.999); | 3491 float likely = PROB_LIKELY(0.999); |
3493 float unlikely = PROB_UNLIKELY(0.999); | 3492 float unlikely = PROB_UNLIKELY(0.999); |
3494 Node* zero = __ ConI(0); | 3493 Node* zero = __ ConI(0); |
3495 Node* zeroX = __ ConX(0); | 3494 Node* zeroX = __ ConX(0); |
3509 | 3508 |
3510 Node* buffer_adr = __ AddP(no_base, tls, __ ConX(buffer_offset)); | 3509 Node* buffer_adr = __ AddP(no_base, tls, __ ConX(buffer_offset)); |
3511 Node* index_adr = __ AddP(no_base, tls, __ ConX(index_offset)); | 3510 Node* index_adr = __ AddP(no_base, tls, __ ConX(index_offset)); |
3512 | 3511 |
3513 // Now some values | 3512 // Now some values |
3514 | 3513 // Use ctrl to avoid hoisting these values past a safepoint, which could |
3515 Node* index = __ load(no_ctrl, index_adr, TypeInt::INT, T_INT, Compile::AliasIdxRaw); | 3514 // potentially reset these fields in the JavaThread. |
3516 Node* buffer = __ load(no_ctrl, buffer_adr, TypeRawPtr::NOTNULL, T_ADDRESS, Compile::AliasIdxRaw); | 3515 Node* index = __ load(__ ctrl(), index_adr, TypeInt::INT, T_INT, Compile::AliasIdxRaw); |
3517 | 3516 Node* buffer = __ load(__ ctrl(), buffer_adr, TypeRawPtr::NOTNULL, T_ADDRESS, Compile::AliasIdxRaw); |
3518 | 3517 |
3519 // Convert the store obj pointer to an int prior to doing math on it | 3518 // Convert the store obj pointer to an int prior to doing math on it |
3520 // Must use ctrl to prevent "integerized oop" existing across safepoint | 3519 // Must use ctrl to prevent "integerized oop" existing across safepoint |
3521 Node* cast = __ CastPX(__ ctrl(), adr); | 3520 Node* cast = __ CastPX(__ ctrl(), adr); |
3522 | 3521 |