Skip to content

[mono][interp] Attempt to interpret m2n wrapper if it is not found in aot image#100025

Merged
BrzVlad merged 2 commits intodotnet:mainfrom
BrzVlad:fix-interp-m2n-from-aot
Mar 21, 2024
Merged

[mono][interp] Attempt to interpret m2n wrapper if it is not found in aot image#100025
BrzVlad merged 2 commits intodotnet:mainfrom
BrzVlad:fix-interp-m2n-from-aot

Conversation

@BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Mar 20, 2024

On ios with interpreter enabled it can happen to mark an assembly as aot and have the rest interpreted, including SPC.dll. If the aot code attempts to do an icall, for example Math.Ceiling defined in SPC.dll, it will fail to find the m2n wrapper, since SPC.dll is not aot-ed. We fix this by obtaining an interp entry thunk, in order to execute the wrapper in interp, if we can't find the aot version of wrapper.

Contributes to #99248

BrzVlad added 2 commits March 20, 2024 18:00
interp_create_method_pointer should only ever return a function pointer callable from compiled code.
… aot image

On ios with interpreter enabled it can happen to mark an assembly as aot and have the rest interpreted, including SPC.dll. If the aot code attempts to do an icall, for example Math.Ceiling defined in SPC.dll, it will fail to find the m2n wrapper, since SPC.dll is not aot-ed. We fix this by obtaining an interp entry thunk, in order to execute the wrapper in interp, if we can't find the aot version of wrapper.
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @BrzVlad, @kotlarmilos
See info in area-owners.md if you want to be subscribed.

@BrzVlad
Copy link
Member Author

BrzVlad commented Jul 25, 2024

/backport to release/8.0-staging

@github-actions github-actions bot unlocked this conversation Jul 25, 2024
@github-actions
Copy link
Contributor

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 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.

2 participants