diff options
author | kvn <none@none> | 2008-08-27 14:47:32 -0700 |
---|---|---|
committer | kvn <none@none> | 2008-08-27 14:47:32 -0700 |
commit | 9549bbf02e3a2d84e48a932523d42350368edd80 (patch) | |
tree | b441dbdba749d15e6ea1a3ed2ac724d04acdfb9e /src/share/vm/opto/macro.cpp | |
parent | 307dc498799db11634bdbcb42a2a4930167e0793 (diff) | |
download | jdk8u_hotspot-9549bbf02e3a2d84e48a932523d42350368edd80.tar.gz |
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
Diffstat (limited to 'src/share/vm/opto/macro.cpp')
-rw-r--r-- | src/share/vm/opto/macro.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/share/vm/opto/macro.cpp b/src/share/vm/opto/macro.cpp index c496c8fd9..f8aea8e36 100644 --- a/src/share/vm/opto/macro.cpp +++ b/src/share/vm/opto/macro.cpp @@ -594,7 +594,7 @@ bool PhaseMacroExpand::scalar_replacement(AllocateNode *alloc, GrowableArray <Sa // 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 @@ bool PhaseMacroExpand::scalar_replacement(AllocateNode *alloc, GrowableArray <Sa 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; |