mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-09 17:44:48 +09:00
[jit] use helper to obtain method signature (#35344)
`mini_method_get ()` doesn't guarantee that `method->signature` is set. Fixes a problem in https://github.com/mono/mono/pull/19624 /cc @lewing Co-authored-by: lewurm <lewurm@users.noreply.github.com>
This commit is contained in:
parent
d12a038f19
commit
c74ea5ac1e
1 changed files with 4 additions and 2 deletions
|
@ -8924,6 +8924,7 @@ calli_end:
|
|||
MonoInst *val;
|
||||
MonoClass *enum_class;
|
||||
MonoMethod *has_flag;
|
||||
MonoMethodSignature *has_flag_sig;
|
||||
|
||||
--sp;
|
||||
val = *sp;
|
||||
|
@ -8977,8 +8978,9 @@ calli_end:
|
|||
(has_flag = mini_get_method (cfg, method, callvirt_token, NULL, generic_context)) &&
|
||||
has_flag->klass == mono_defaults.enum_class &&
|
||||
!strcmp (has_flag->name, "HasFlag") &&
|
||||
has_flag->signature->hasthis &&
|
||||
has_flag->signature->param_count == 1) {
|
||||
(has_flag_sig = mono_method_signature_internal (has_flag)) &&
|
||||
has_flag_sig->hasthis &&
|
||||
has_flag_sig->param_count == 1) {
|
||||
CHECK_TYPELOAD (enum_class);
|
||||
|
||||
if (enum_class == klass) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue