[x86/ARM32/RuyJit] Zero relocation
I try to compile with ILC compiler some ARM sample by x86 environment with armelnonjit. There is a problem with recordRelocation. Here imm comes with zero value from genSetRegToConst. It calls: instGen_Set_Reg_To_Imm(EA_HANDLE_CNS_RELOC, targetReg, cnsVal) with zero cnsVal. I'm trying to figure it out okay or not? Why is there 0 value and the relocation flag is set? Can I just protect and do not create relocation if there's zero? Or maybe it reports on some more significant problem somewhere else.
@dotnet/arm32-contrib
What is the C#/IL code that causes us to hit this path?
This can be a problem on CoreCLR as well.
@jkotas
using System;
namespace Hello
{
internal class Program
{
private static void Main(string[] args)
{
if (args.Length == 0)
{
Console.WriteLine("Usage: hello name");
return;
}
Console.WriteLine("Hello " + args[0]);
}
}
}
Maybe it's important, this only happens when the compilation is in release mode(ilc release build, CoreCLR release), debug compilation ends successfully.
This is probably hit by one of the framework methods. Could you please find out the exact method name that hits this?
https://github.com/dotnet/coreclr/issues/17109 looks like exactly same problem.
[S.P.CompilerGenerated]Internal.CompilerGenerated.<Module>.InvokeRetO<int64>(object,native int,ArgSetupState&,bool)
Assuming Duplicate of dotnet/coreclr#17109.