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:
I assume this is what these comments mean:
|
case ReadyToRunHelper.MemCpy: |
|
mangledName = "memcpy"; // TODO: Null reference handling |
|
break; |
|
case ReadyToRunHelper.MemSet: |
|
mangledName = "memset"; // TODO: Null reference handling |
|
break; |
so I decided to file a tracking issue.
(while CoreCLR wraps memset/memcpy calls into non-inlineable/without tail calls helpers)
Compile the following program and run:
CoreCLR:
NativeAOT:
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)