-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
dotnet/coreclr
#24871Labels
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 SuperPMIbug
Milestone
Description
On 3.0.0-preview5-27626-15 and 3.0.0-preview6-27728-04 (Windows 10 1809, x64), attempting to run this:
var destination = new byte[1];
var source = new byte[1];
Unsafe.CopyBlockUnaligned(ref destination[0], ref source[0], 0);
results in an access violation in clrjit.dll.
There is no issue if the parameter is not constant, like so:
[MethodImpl(MethodImplOptions.NoInlining)]
public static void Trub(uint copyCount)
{
var destination = new byte[1];
var source = new byte[1];
Unsafe.CopyBlockUnaligned(ref destination[0], ref source[0], copyCount);
}
public static void Test()
{
Trub(0);
}
Changing the above MethodImpl to AggressiveInlining reintroduces the access violation.
Disabling optimizations avoids the issue. Does not occur on 2.1.11 or 2.2.3.
Reactions are currently unavailable
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 SuperPMIbug