-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix NativeAOT rethrow bug The rethrowing incorrectly starts searching for exception clause based on the previously searched clause for the exception being rethrown. It should always start from the beginning. * Cleanup and a regression test
- Loading branch information
Showing
3 changed files
with
46 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Reflection; | ||
|
||
public class test88113 | ||
{ | ||
public static int Main() | ||
{ | ||
try | ||
{ | ||
throw new Exception("boo"); | ||
} | ||
catch (Exception ex2) | ||
{ | ||
Console.WriteLine($"1: {ex2}"); | ||
try | ||
{ | ||
throw; | ||
} | ||
catch (Exception ex3) | ||
{ | ||
Console.WriteLine($"2: {ex3}"); | ||
} | ||
} | ||
|
||
return 100; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/tests/Regressions/coreclr/GitHub_88128/test88128.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<CLRTestPriority>1</CLRTestPriority> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="test88128.cs" /> | ||
</ItemGroup> | ||
</Project> |