Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mono/mono/mini/method-to-ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -4322,7 +4322,7 @@ mini_emit_ldelema_2_ins (MonoCompile *cfg, MonoClass *klass, MonoInst *arr, Mono
#endif

/* range checking */
MONO_EMIT_NEW_LOAD_MEMBASE (cfg, bounds_reg,
MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, bounds_reg,
arr->dreg, MONO_STRUCT_OFFSET (MonoArray, bounds));
Comment thread
jandupej marked this conversation as resolved.

MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADI4_MEMBASE, low1_reg,
Expand Down
38 changes: 38 additions & 0 deletions src/tests/Regressions/coreclr/GitHub_79022/test79022.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// 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.Runtime.CompilerServices;

class Program
{
// This is a regression test for https://github.com/dotnet/runtime/issues/79022
static ulong[,] s_1;

[MethodImpl(MethodImplOptions.NoInlining)]
static void Test()
{
try
{
ushort vr10 = default(ushort);
bool vr11 = 0 < ((s_1[0, 0] * (uint)(0 / vr10)) % 1);
}
catch
{
}
}

public static int Main()
{
try
{
Test();
}
catch
{
return -1;
}

return 100;
}
}
10 changes: 10 additions & 0 deletions src/tests/Regressions/coreclr/GitHub_79022/test79022.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
<WarningsNotAsErrors>CS0649</WarningsNotAsErrors>
</PropertyGroup>
<ItemGroup>
<Compile Include="test79022.cs" />
</ItemGroup>
</Project>