Revert^4 "Allow structural redefinition on non-final classes."
This reverts commit 664999a12d6fc8a8ef5c0519b12ec1e8a51bb085.
Fixed issues with GC and quickened instructions in parent CLs.
Reason for revert: Fixed issues with GC CHECK fail and device SEGVs.
Test: ./test.py --host
Test: ./test.py --target
Bug: 134162467
Bug: 144168550
Change-Id: Ibacddaf45beb72184f97d53d5d048bd442578658
diff --git a/openjdkjvmti/ti_heap.cc b/openjdkjvmti/ti_heap.cc
index b645590..974a710 100644
--- a/openjdkjvmti/ti_heap.cc
+++ b/openjdkjvmti/ti_heap.cc
@@ -1655,6 +1655,10 @@
// We don't want to update the declaring class of any objects. They will be replaced
// in the heap and we need the declaring class to know its size.
return;
+ } else if (UNLIKELY(!is_static && off == art::mirror::Class::SuperClassOffset() &&
+ obj->IsClass())) {
+ // We don't want to be messing with the class hierarcy either.
+ return;
}
VLOG(plugin) << "Updating field at offset " << off.Uint32Value() << " of type "
<< obj->GetClass()->PrettyClass();