Description
Compile the following program and run:
static unsafe void Main(string[] args)
{
Unsafe.InitBlock(null, 0, 1000);
}
CoreCLR:
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
NativeAOT:
no exception, exits.
I assume this is what these comments mean:
runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/JitHelper.cs
Lines 118 to 123 in 3e55167
so I decided to file a tracking issue.
(while CoreCLR wraps memset/memcpy calls into non-inlineable/without tail calls helpers)