OpenJDK / amber / amber
changeset 54371:b5281bf751ea
8216427: ciMethodData::load_extra_data() does not always unpack the last entry
Reviewed-by: thartmann, kvn
author | eosterlund |
---|---|
date | Tue, 15 Jan 2019 09:44:18 +0100 |
parents | 8e260023fc53 |
children | 1884ecc20c38 |
files | src/hotspot/share/ci/ciMethodData.cpp |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/share/ci/ciMethodData.cpp Mon Jan 14 15:07:22 2019 +0100 +++ b/src/hotspot/share/ci/ciMethodData.cpp Tue Jan 15 09:44:18 2019 +0100 @@ -168,9 +168,12 @@ // in the prepare_metadata call above) as we translate the copy: // update the copy as we go. int tag = dp_src->tag(); - if (tag != DataLayout::arg_info_data_tag) { - memcpy(dp_dst, dp_src, ((intptr_t)MethodData::next_extra(dp_src)) - ((intptr_t)dp_src)); + size_t entry_size = DataLayout::header_size_in_bytes(); + if (tag != DataLayout::no_tag) { + ProfileData* src_data = dp_src->data_in(); + entry_size = src_data->size_in_bytes(); } + memcpy(dp_dst, dp_src, entry_size); switch(tag) { case DataLayout::speculative_trap_data_tag: {