[android] Fix crash in method_to_ir by steveisok · Pull Request #109381 · dotnet/runtime (original) (raw)

@steveisok

There exists a possibility where the klass being passed to try_prepare_objaddr_callvirt_optimization is not legit. This can result in unpredictable crashes.

To fix, we pass the MonoType and flush out the MonoClass by calling mono_class_from_mono_type_internal.

Fixes dotnet#109111

lambdageek

This was referenced

Oct 30, 2024

@steveisok

This was referenced

Nov 1, 2024

This was referenced

Nov 4, 2024

steveisok pushed a commit that referenced this pull request

Nov 8, 2024

@github-actions

Backport of #109381

There exists a possibility where the klass being passed to try_prepare_objaddr_callvirt_optimization is not legit. This can result in unpredictable crashes.

To fix, we pass the MonoType and flush out the MonoClass by calling mono_class_from_mono_type_internal.

Fixes #109111

steveisok pushed a commit that referenced this pull request

Nov 11, 2024

@github-actions

Backport of #109381

There exists a possibility where the klass being passed to try_prepare_objaddr_callvirt_optimization is not legit. This can result in unpredictable crashes.

To fix, we pass the MonoType and flush out the MonoClass by calling mono_class_from_mono_type_internal.

Fixes #109111

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})