aboutsummaryrefslogtreecommitdiffstats
path: root/hotspot/.hg/patches/light-jdk8u5-b13.patch
diff options
context:
space:
mode:
authorIvan Dubrov <idubrov@guidewire.com>2014-05-01 19:10:33 -0700
committerIvan Dubrov <idubrov@guidewire.com>2014-05-01 19:10:33 -0700
commit366783cbb49c4b71b2a1805fc3d1552fe7498802 (patch)
tree7070e75939da75b8e8b151022f11db517fd5fa80 /hotspot/.hg/patches/light-jdk8u5-b13.patch
parent9797ba2f6e8b51b9ab7963f894169540269d7fbb (diff)
downloaddcevm-366783cbb49c4b71b2a1805fc3d1552fe7498802.tar.gz
dcevm-366783cbb49c4b71b2a1805fc3d1552fe7498802.zip
Fixing MH's in case of instance fields swapping
Same fix as for static fields, update offset directly in the DirectMethodHandle$Accessor.
Diffstat (limited to 'hotspot/.hg/patches/light-jdk8u5-b13.patch')
-rw-r--r--hotspot/.hg/patches/light-jdk8u5-b13.patch17
1 files changed, 9 insertions, 8 deletions
diff --git a/hotspot/.hg/patches/light-jdk8u5-b13.patch b/hotspot/.hg/patches/light-jdk8u5-b13.patch
index 58844702..f065525f 100644
--- a/hotspot/.hg/patches/light-jdk8u5-b13.patch
+++ b/hotspot/.hg/patches/light-jdk8u5-b13.patch
@@ -1564,7 +1564,7 @@ diff --git a/src/share/vm/prims/jvmtiRedefineClasses2.cpp b/src/share/vm/prims/j
new file mode 100644
--- /dev/null
+++ b/src/share/vm/prims/jvmtiRedefineClasses2.cpp
-@@ -0,0 +1,2100 @@
+@@ -0,0 +1,2101 @@
+/*
+ * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2769,14 +2769,15 @@ new file mode 100644
+ int flags = java_lang_invoke_MemberName::flags(mem_name);
+ int ref_kind = (flags >> REFERENCE_KIND_SHIFT) & REFERENCE_KIND_MASK;
+ if (MethodHandles::ref_kind_is_field(ref_kind)) {
-+ if (java_lang_invoke_DirectMethodHandle_StaticAccessor::is_instance(obj)) {
-+ InstanceKlass* ik = InstanceKlass::cast(obj->klass());
-+ if (java_lang_invoke_MemberName::vmindex(mem_name) != 0) {
-+ // Note: we don't care about staticBase field (which is java.lang.Class)
-+ // It should be processed during normal object update.
-+ // Update offset in StaticAccessor
-+ int offset = java_lang_invoke_MemberName::vmindex(mem_name);
++ // Note: we don't care about staticBase field (which is java.lang.Class)
++ // It should be processed during normal object update.
++ // Update offset in StaticAccessor
++ int offset = java_lang_invoke_MemberName::vmindex(mem_name);
++ if (offset != 0) { // index of 0 means that field no longer exist
++ if (java_lang_invoke_DirectMethodHandle_StaticAccessor::is_instance(obj)) {
+ java_lang_invoke_DirectMethodHandle_StaticAccessor::set_static_offset(obj, offset);
++ } else if (java_lang_invoke_DirectMethodHandle_Accessor::is_instance(obj)) {
++ java_lang_invoke_DirectMethodHandle_Accessor::set_field_offset(obj, offset);
+ }
+ }
+ }