Mercurial > hg > truffle
diff src/share/vm/opto/macro.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 | b0fe4deeb9fb |
children | f8199438385b |
line wrap: on
line diff
--- a/src/share/vm/opto/macro.cpp Wed Aug 27 09:15:46 2008 -0700 +++ b/src/share/vm/opto/macro.cpp Wed Aug 27 14:47:32 2008 -0700 @@ -594,7 +594,7 @@ // Scan object's fields adding an input to the safepoint for each field. for (int j = 0; j < nfields; j++) { - int offset; + intptr_t offset; ciField* field = NULL; if (iklass != NULL) { field = iklass->nonstatic_field_at(j); @@ -602,7 +602,7 @@ elem_type = field->type(); basic_elem_type = field->layout_type(); } else { - offset = array_base + j * element_size; + offset = array_base + j * (intptr_t)element_size; } const Type *field_type;