Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Access violation in clrjit.dll on Unsafe.CopyBlockUnaligned with constant 0 copy length #24846
On 3.0.0-preview5-27626-15 and 3.0.0-preview6-27728-04 (Windows 10 1809, x64), attempting to run this:
results in an access violation in clrjit.dll.
There is no issue if the parameter is not constant, like so:
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.
Checked jit asserts:
I think we are assuming that a BLK of width 0 is always a DYN_BLK.
If the asserts is removed then it seems to work fine, though unexpectedly generating a helper call: