Commit bee7e39
[release/10.0] Narrow Mono AOT typeload error cleanup (#129804)
Backport of #129748 to release/10.0
/cc @vitek-karas
## Customer Impact
- [x] Customer reported
- [ ] Found internally
Fixes #129613
Without this fix, some customer apps fail to AOT compile on .NET 10 with
an assertion in `inline_method()` followed by `Failed to AOT compile ...
exited with code 134`. In the reported case this blocks publishing an
iOS app with Mono AOT, while the same scenario worked on .NET 8.
## Regression
- [x] Yes
- [ ] No
This is a regression between .NET 8 and .NET 9 introduced by
#91261.
## Testing
- `./build.sh mono -os iossimulator -arch arm64 -c Release -rf mono`
- validated manually against the customer issue sample / reduced repro
by replaying the exact failing AOT compiler command and confirming the
fixed compiler succeeds where the regressed compiler asserts in
`inline_method()`
- added a direct Mono mini regression in `src/mono/mono/mini/iltests.il`
- local regression validation:
- `mono iltests.exe --run-only missing_field_then_inline`
- `mono --aot=full,static iltests.exe`
## Risk
Low.
This is a targeted fix in Mono AOT compiler error handling plus a
focused regression test. The change modifies a path which always fails
to correctly handle the missing field reference and allow the
application to compile (the error is then reported at runtime when the
affected code path executes).
**IMPORTANT**: If this backport is for a servicing release, please
verify that:
- For .NET 8 and .NET 9: The PR target branch is `release/X.0-staging`,
not `release/X.0`.
- For .NET 10+: The PR target branch is `release/X.0` (no `-staging`
suffix).
## Package authoring no longer needed in .NET 9
**IMPORTANT**: Starting with .NET 9, you no longer need to edit a NuGet
package's csproj to enable building and bump the version.
Keep in mind that we still need package authoring in .NET 8 and older
versions.
---------
Co-authored-by: vitek-karas <10670590+vitek-karas@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent ab591ee commit bee7e39
2 files changed
Lines changed: 58 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3224 | 3224 | | |
3225 | 3225 | | |
3226 | 3226 | | |
| 3227 | + | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
| 3239 | + | |
| 3240 | + | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
| 3255 | + | |
| 3256 | + | |
| 3257 | + | |
| 3258 | + | |
| 3259 | + | |
| 3260 | + | |
| 3261 | + | |
| 3262 | + | |
| 3263 | + | |
| 3264 | + | |
| 3265 | + | |
| 3266 | + | |
| 3267 | + | |
| 3268 | + | |
| 3269 | + | |
| 3270 | + | |
| 3271 | + | |
| 3272 | + | |
| 3273 | + | |
| 3274 | + | |
| 3275 | + | |
| 3276 | + | |
3227 | 3277 | | |
3228 | 3278 | | |
3229 | 3279 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10167 | 10167 | | |
10168 | 10168 | | |
10169 | 10169 | | |
10170 | | - | |
10171 | | - | |
10172 | | - | |
| 10170 | + | |
| 10171 | + | |
| 10172 | + | |
| 10173 | + | |
| 10174 | + | |
| 10175 | + | |
| 10176 | + | |
| 10177 | + | |
10173 | 10178 | | |
10174 | 10179 | | |
10175 | 10180 | | |
| |||
0 commit comments