Mercurial > hg > truffle
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/opto/escape.cpp Wed Aug 27 09:15:46 2008 -0700 +++ b/src/share/vm/opto/escape.cpp Wed Aug 27 14:47:32 2008 -0700 @@ -501,7 +501,7 @@ // compute an appropriate address type (cases #3 and #5). assert(igvn->type(addp) == TypeRawPtr::NOTNULL, "must be raw pointer"); assert(addp->in(AddPNode::Address)->is_Proj(), "base of raw address must be result projection from allocation"); - int offs = (int)igvn->find_intptr_t_con(addp->in(AddPNode::Offset), Type::OffsetBot); + intptr_t offs = (int)igvn->find_intptr_t_con(addp->in(AddPNode::Offset), Type::OffsetBot); assert(offs != Type::OffsetBot, "offset must be a constant"); t = base_t->add_offset(offs)->is_oopptr(); }