mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8019632: Method parameters are not copied in clone_with_new_data
Add code to copy method parameters data in clone_with_new_data Reviewed-by: coleenp, sspitsyn
This commit is contained in:
parent
e7cb3dfa22
commit
dd70c34130
1 changed files with 7 additions and 0 deletions
|
@ -1163,6 +1163,7 @@ methodHandle Method::clone_with_new_data(methodHandle m, u_char* new_code, int n
|
|||
newm->constMethod()->set_constMethod_size(new_const_method_size);
|
||||
newm->set_method_size(new_method_size);
|
||||
assert(newm->code_size() == new_code_length, "check");
|
||||
assert(newm->method_parameters_length() == method_parameters_len, "check");
|
||||
assert(newm->checked_exceptions_length() == checked_exceptions_len, "check");
|
||||
assert(newm->exception_table_length() == exception_table_len, "check");
|
||||
assert(newm->localvariable_table_length() == localvariable_len, "check");
|
||||
|
@ -1174,6 +1175,12 @@ methodHandle Method::clone_with_new_data(methodHandle m, u_char* new_code, int n
|
|||
new_compressed_linenumber_table,
|
||||
new_compressed_linenumber_size);
|
||||
}
|
||||
// Copy method_parameters
|
||||
if (method_parameters_len > 0) {
|
||||
memcpy(newm->method_parameters_start(),
|
||||
m->method_parameters_start(),
|
||||
method_parameters_len * sizeof(MethodParametersElement));
|
||||
}
|
||||
// Copy checked_exceptions
|
||||
if (checked_exceptions_len > 0) {
|
||||
memcpy(newm->checked_exceptions_start(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue