Repository navigation
Unskip NestedCatch_DuplicateLocal_NoAwaitInNestedCatch #132017
Copy link
Copy link
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
Description
Activity
- added a commit that references this issue
on Aug 6, 2026 This appears to be a runtime-async bug in .NET 11 Preview 6. I reduced the test to the following file-based app:
#:property Features=runtime-async=on #:property LangVersion=preview #:property Optimize=true #:property NoWarn=SYSLIB5007;CA2252 using System; using System.Threading.Tasks; Test.Run(); class Test { static int calls; public static void Run() { var test = new Test(); test.M(false).GetAwaiter().GetResult(); test.M(true).GetAwaiter().GetResult(); if (calls != 2) throw new Exception($"Expected 2 calls, got {calls}"); } static bool Filter(bool result) { Console.WriteLine("filter"); return result; } async Task M(bool first) { try { throw new Exception("outer"); } catch (Exception ex) when (Filter(first)) { await Print(ex); } catch (Exception ex) when (Filter(true)) { try { await Task.Yield(); throw new Exception(); } catch { _ = Print(ex); } } } static async Task Print(Exception ex) { var message = ex.Message; Console.WriteLine(message); await Task.Yield(); calls++; } }
With
global.jsonpinned to SDK10.0.301, this exits successfully:$ DOTNET_RuntimeAsync=1 dotnet run 84787.cs filter filter outer filter outer
With
global.jsonpinned to SDK11.0.100-preview.6.26359.118, the same command fails because only onePrintcontinuation completes:$ dotnet run 84787.cs filter filter filter outer Unhandled exception. System.Exception: Expected 2 calls, got 1
This comment was generated by AI.
- addeduntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
on Aug 7, 2026 - addedarea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
on Aug 7, 2026 dotnet-policy-service commented
on Aug 7, 2026 ContributorMore actionsTagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.- removeduntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
on Aug 10, 2026 - locked and limited conversation to collaborators
on Sep 10, 2026
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
In the move from running against .NET 10 to .NET 11 preview, the following async runtime test failure was encountered:
CodeGenAsyncEHTests.NestedCatch_DuplicateLocal_NoAwaitInNestedCatch(awaitInTry2: True)