Commit 7dbe917
[wasm] Fix interpreter crash with MethodImpl .override on PortableEntryPoints
Resolve MethodImpl overrides in getCallInfo for direct calls when
FEATURE_PORTABLE_ENTRYPOINTS is enabled. On non-WASM, this resolution
happens in getFunctionEntryPoint via MapMethodDeclToMethodImpl, but
that function is not available with portable entry points. Adding
the resolution to getCallInfo ensures the interpreter compiler
receives the correct target MethodDesc at compile time.
This fixes a crash where a non-virtual call to a MethodImpl-overridden
method (e.g. call instance MyBar::DoBar() with .override pointing to
DoBarOverride) would target the wrong method, leading to uninitialized
interpreter code.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 875672f commit 7dbe917
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5372 | 5372 | | |
5373 | 5373 | | |
5374 | 5374 | | |
| 5375 | + | |
| 5376 | + | |
| 5377 | + | |
| 5378 | + | |
| 5379 | + | |
| 5380 | + | |
| 5381 | + | |
| 5382 | + | |
| 5383 | + | |
| 5384 | + | |
| 5385 | + | |
| 5386 | + | |
| 5387 | + | |
| 5388 | + | |
5375 | 5389 | | |
5376 | 5390 | | |
5377 | 5391 | | |
| |||
0 commit comments