Commit 976c0be
[tests] Ignore the CoreCLR 'dotnet watch' tests on the mobile platforms.
Hot Reload with CoreCLR is currently broken on iOS and Mac Catalyst: the app
crashes right after the update has been applied:
dotnet watch ⌚ File updated: .../AdditionalFile.cs
Unhandled exception. System.BadImageFormatException: Bad IL range.
at HotReloadTestApp.Program.DoSomething(Int32 i)
at HotReloadTestApp.Program.RunTestLogic()
at HotReloadTestApp.Program.Main(String[] args)
dotnet watch ❌ [HotReloadTestApp (net11.0-maccatalyst)] Exited with error code 134
The "Bad IL range" error comes from CoreCLR's PEAssembly::GetIL, which means the
runtime looked up the updated method's IL in the *baseline* PE image using the
RVA from the metadata delta - and that RVA is delta-relative, so it's out of
range in the baseline image. In other words the runtime didn't pick up the delta
IL when compiling the updated method.
This is fallout from dotnet/runtime#130159 ("Use
CodeVersioning for EnC"), which made the delta IL be stored as an ILCodeVersion:
only VersionedPrepareCodeConfig::GetILHeader returns it, while the plain
PrepareCodeConfig::GetILHeader falls back to MethodDesc::GetILHeader (= the
baseline RVA lookup that ends up throwing). So something prepares the updated
method with a non-versioned config on the affected platforms.
Note that the mobile difference is *not* code versioning as such - that's
enabled everywhere, since FEATURE_METADATA_UPDATER turns on
FEATURE_CODE_VERSIONING, and MethodDesc::IsEligibleForEnC doesn't depend on
tiered compilation. What actually differs is that FEATURE_DYNAMIC_CODE_COMPILED
is off for Apple mobile, so there's no JIT and these apps run the CoreCLR
interpreter instead. That's also why desktop macOS is unaffected.
Nothing we can do about this on our side, so just ignore the affected test cases
for now. The Mono test cases and the desktop macOS test cases still run.
Tracked upstream in dotnet/runtime#132804, and in
#26470 on our side. Re-enable these test
cases once the fix has flowed into our runtime.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent ac84fef commit 976c0be
1 file changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
58 | 82 | | |
59 | 83 | | |
60 | 84 | | |
| |||
0 commit comments