Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[android] Fix crash in method_to_ir #109381

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

steveisok
Copy link
Member

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

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
@srxqds
Copy link
Contributor

srxqds commented Nov 1, 2024

hope you can backport to release/9.0 and release/8.0 branch

@steveisok steveisok merged commit 004d59a into dotnet:main Nov 4, 2024
75 of 79 checks passed
@steveisok
Copy link
Member Author

/backport to release/9.0-staging

@steveisok
Copy link
Member Author

/backport to release/8.0-staging

Copy link
Contributor

github-actions bot commented Nov 4, 2024

Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/11668026238

Copy link
Contributor

github-actions bot commented Nov 4, 2024

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/11668029176

steveisok pushed a commit that referenced this pull request Nov 8, 2024
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
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
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Native SIGSEGV crashes in mono_method_to_ir
3 participants