comparison src/share/vm/opto/graphKit.hpp @ 23055:c1c199dde5c9

8077504: Unsafe load can loose control dependency and cause crash Summary: Node::depends_only_on_test() should return false for Unsafe loads Reviewed-by: kvn, adinn
author roland
date Wed, 03 Jun 2015 14:22:57 +0200
parents eb8b5cc64669
children dd9cc155639c 535618ab1c04
comparison
equal deleted inserted replaced
23054:55d07ec5bde4 23055:c1c199dde5c9
514 // 514 //
515 // We choose the unordered semantics by default because we have 515 // We choose the unordered semantics by default because we have
516 // adapted the `do_put_xxx' and `do_get_xxx' procedures for the case 516 // adapted the `do_put_xxx' and `do_get_xxx' procedures for the case
517 // of volatile fields. 517 // of volatile fields.
518 Node* make_load(Node* ctl, Node* adr, const Type* t, BasicType bt, 518 Node* make_load(Node* ctl, Node* adr, const Type* t, BasicType bt,
519 MemNode::MemOrd mo, bool require_atomic_access = false) { 519 MemNode::MemOrd mo, LoadNode::ControlDependency control_dependency = LoadNode::DependsOnlyOnTest,
520 bool require_atomic_access = false) {
520 // This version computes alias_index from bottom_type 521 // This version computes alias_index from bottom_type
521 return make_load(ctl, adr, t, bt, adr->bottom_type()->is_ptr(), 522 return make_load(ctl, adr, t, bt, adr->bottom_type()->is_ptr(),
522 mo, require_atomic_access); 523 mo, control_dependency, require_atomic_access);
523 } 524 }
524 Node* make_load(Node* ctl, Node* adr, const Type* t, BasicType bt, const TypePtr* adr_type, 525 Node* make_load(Node* ctl, Node* adr, const Type* t, BasicType bt, const TypePtr* adr_type,
525 MemNode::MemOrd mo, bool require_atomic_access = false) { 526 MemNode::MemOrd mo, LoadNode::ControlDependency control_dependency = LoadNode::DependsOnlyOnTest,
527 bool require_atomic_access = false) {
526 // This version computes alias_index from an address type 528 // This version computes alias_index from an address type
527 assert(adr_type != NULL, "use other make_load factory"); 529 assert(adr_type != NULL, "use other make_load factory");
528 return make_load(ctl, adr, t, bt, C->get_alias_index(adr_type), 530 return make_load(ctl, adr, t, bt, C->get_alias_index(adr_type),
529 mo, require_atomic_access); 531 mo, control_dependency, require_atomic_access);
530 } 532 }
531 // This is the base version which is given an alias index. 533 // This is the base version which is given an alias index.
532 Node* make_load(Node* ctl, Node* adr, const Type* t, BasicType bt, int adr_idx, 534 Node* make_load(Node* ctl, Node* adr, const Type* t, BasicType bt, int adr_idx,
533 MemNode::MemOrd mo, bool require_atomic_access = false); 535 MemNode::MemOrd mo, LoadNode::ControlDependency control_dependency = LoadNode::DependsOnlyOnTest,
536 bool require_atomic_access = false);
534 537
535 // Create & transform a StoreNode and store the effect into the 538 // Create & transform a StoreNode and store the effect into the
536 // parser's memory state. 539 // parser's memory state.
537 // 540 //
538 // We must ensure that stores of object references will be visible 541 // We must ensure that stores of object references will be visible