Repository navigation
Commit 5c087d9
Fix github60486 AOT caller identity and frame enumeration (#133775)
## Summary
This fixes #133798
Fix the two AOT failures exposed by the expanded `github60486`
regression in #133707 and observed in CI for
#133774.
- Preserve callers of the stack-walk implementation of
`MethodBase.GetCurrentMethod` during Mono LLVM inlining. The LLVM-only
intrinsic already prevents inlining; the stack-walk path needs the same
protection. The test's inlineable helper remains unannotated.
- Allow unrelated NativeAOT stack frames to lack reflection metadata. A
local diagnostic run identified `TestEntryPoint` as the frame returning
null from `GetMethod`; all four recursive frames returned valid method
metadata. Keep the exact four-frame assertion and all existing DIM,
exception-stack, caller-identity, and GC-root checks.
Related caller-inlining report: #60334. Its iOS
configuration was not tested here.
## Validation
Built Checked CoreCLR/NativeAOT and Release Mono with LLVM from a clean
baseline in the same worktree.
| Windows x64 configuration | Before | After |
|---|---|---|
| NativeAOT Checked | Reported null-reference failure | Pass |
| Mono LLVM AOT Release | Expected `GetCurrentMethodInlineable`, actual
`ValidateCurrentMethod` | Pass |
| CoreCLR Checked | Pass | Pass |
| Mono MiniJIT Release | Pass | Pass |
Each run executes the full standalone `github60486` regression. Mono
LLVM AOT comparisons use identical test IL, and runtime logging confirms
the fixed AOT image is loaded. LLVM IR adds `noinline` to the inlineable
and generic wrappers; the optimized caller retains the helper call
instead of inlining it. No performance claim is made.
The Windows Mono LLVM AOT reproduction matches the Linux CI failure
signature. Linux and browser Wasm were not run locally. The Windows x64
JIT formatting check completed successfully.
> [!NOTE]
> This change and pull request description were developed with GitHub
Copilot assistance.
Co-authored-by: Copilot App <[email protected]>1 parent 3c245fd commit 5c087d9
2 files changed
Lines changed: 5 additions & 1 deletion
File tree
- src
- mono/mono/mini
- tests/Loader/classloader/DefaultInterfaceMethods/regressions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2078 | 2078 | | |
2079 | 2079 | | |
2080 | 2080 | | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
2081 | 2084 | | |
2082 | 2085 | | |
2083 | 2086 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
| 172 | + | |
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
| |||
0 commit comments