mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8181171: Deleting method for RedefineClasses breaks ResolvedMethodName
8210457: JVM crash in ResolvedMethodTable::add_method(Handle) Add a function to call NSME in ResolvedMethodTable to replace deleted methods. Reviewed-by: sspitsyn, dholmes, dcubed
This commit is contained in:
parent
15ec4ba5c6
commit
2a83596e85
13 changed files with 368 additions and 18 deletions
|
@ -2120,7 +2120,8 @@ void Method::change_method_associated_with_jmethod_id(jmethodID jmid, Method* ne
|
|||
// Can't assert the method_holder is the same because the new method has the
|
||||
// scratch method holder.
|
||||
assert(resolve_jmethod_id(jmid)->method_holder()->class_loader()
|
||||
== new_method->method_holder()->class_loader(),
|
||||
== new_method->method_holder()->class_loader() ||
|
||||
new_method->method_holder()->class_loader() == NULL, // allow Unsafe substitution
|
||||
"changing to a different class loader");
|
||||
// Just change the method in place, jmethodID pointer doesn't change.
|
||||
*((Method**)jmid) = new_method;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue