```cs using System.Runtime.CompilerServices; sealed class S { private static int Sink; static void Main() { Test(new int[6], true); } [MethodImpl(MethodImplOptions.NoInlining)] static int Test(int[] arr, bool c) { int prev = arr[5]; int j; if (c) { Sink = 1; j = -5; } else { j = 3; } return prev + arr[j]; } } ``` Expected: ``` System.IndexOutOfRangeException ``` Actual: ``` System.AccessViolationException ```
Activity
dotnet-policy-service commentedon Jul 5, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
MihuBot commentedon Jul 5, 2026
I'm a bot. Here is a possible related and/or duplicate issue (I may be wrong):
JIT: fix incorrect bounds check removal for Phi indices with a negati…
JIT: fix incorrect bounds check removal for Phi indices with a negati…