1
0
Fork 0
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:
monojenkins 2020-04-24 11:16:04 -04:00 committed by GitHub
parent d12a038f19
commit c74ea5ac1e
Signed by: github
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {