Fix incorrect condition in TransformationFaultHandler
We were incorrectly checking if an iterator was
uninitialized_class_definitions_.end() instead of
initialized_class_definitions_.end(). This caused several tests to
fail when run with redefine-stress because they would cause the
faulting code to resume incorrectly.
Test: ./test.py --host -j50
Test: ./test.py --host --redefine-stress -j50
Bug: 73177368
Change-Id: I9ca86aa4e30f342d73545d1a417bab8a0e817251
diff --git a/openjdkjvmti/transform.cc b/openjdkjvmti/transform.cc
index dc9f69a..43b8fe9 100644
--- a/openjdkjvmti/transform.cc
+++ b/openjdkjvmti/transform.cc
@@ -124,7 +124,7 @@
return std::find_if(initialized_class_definitions_.begin(),
initialized_class_definitions_.end(),
[&](const auto op) { return op->ContainsAddress(ptr); }) !=
- uninitialized_class_definitions_.end();
+ initialized_class_definitions_.end();
}
}