mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +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
|
@ -3525,6 +3525,15 @@ void VM_RedefineClasses::update_jmethod_ids() {
|
|||
"should be replaced");
|
||||
}
|
||||
}
|
||||
// Update deleted jmethodID
|
||||
for (int j = 0; j < _deleted_methods_length; ++j) {
|
||||
Method* old_method = _deleted_methods[j];
|
||||
jmethodID jmid = old_method->find_jmethod_id_or_null();
|
||||
if (jmid != NULL) {
|
||||
// Change the jmethodID to point to NSME.
|
||||
Method::change_method_associated_with_jmethod_id(jmid, Universe::throw_no_such_method_error());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int VM_RedefineClasses::check_methods_and_mark_as_obsolete() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue