Mercurial > hg > truffle
comparison src/share/vm/opto/escape.cpp @ 306:af945ba2e739
6741738: TypePtr::add_offset() set incorrect offset when the add overflows
Summary: Set offset to OffsetBot when the add overflows in TypePtr::add_offset()
Reviewed-by: jrose, never
author | kvn |
---|---|
date | Wed, 27 Aug 2008 14:47:32 -0700 |
parents | c3e045194476 |
children | 892493c3d862 |
comparison
equal
deleted
inserted
replaced
305:ab075d07f1ba | 306:af945ba2e739 |
---|---|
499 if (t == NULL) { | 499 if (t == NULL) { |
500 // We are computing a raw address for a store captured by an Initialize | 500 // We are computing a raw address for a store captured by an Initialize |
501 // compute an appropriate address type (cases #3 and #5). | 501 // compute an appropriate address type (cases #3 and #5). |
502 assert(igvn->type(addp) == TypeRawPtr::NOTNULL, "must be raw pointer"); | 502 assert(igvn->type(addp) == TypeRawPtr::NOTNULL, "must be raw pointer"); |
503 assert(addp->in(AddPNode::Address)->is_Proj(), "base of raw address must be result projection from allocation"); | 503 assert(addp->in(AddPNode::Address)->is_Proj(), "base of raw address must be result projection from allocation"); |
504 int offs = (int)igvn->find_intptr_t_con(addp->in(AddPNode::Offset), Type::OffsetBot); | 504 intptr_t offs = (int)igvn->find_intptr_t_con(addp->in(AddPNode::Offset), Type::OffsetBot); |
505 assert(offs != Type::OffsetBot, "offset must be a constant"); | 505 assert(offs != Type::OffsetBot, "offset must be a constant"); |
506 t = base_t->add_offset(offs)->is_oopptr(); | 506 t = base_t->add_offset(offs)->is_oopptr(); |
507 } | 507 } |
508 int inst_id = base_t->instance_id(); | 508 int inst_id = base_t->instance_id(); |
509 assert(!t->is_known_instance() || t->instance_id() == inst_id, | 509 assert(!t->is_known_instance() || t->instance_id() == inst_id, |