Closed Beau-Gosse-dev closed 2 years ago
Tagging subscribers to this area: @hoyosjs See info in area-owners.md if you want to be subscribed.
Author: | Beau-Gosse-dev |
---|---|
Assignees: | - |
Labels: | `area-Infrastructure-coreclr` |
Milestone: | - |
Could you please get a stacktrace of the crash with symbols? You may need to tell the gdb to load the symbols from /home/ubuntu/code/runtime/artifacts/bin/coreclr/Linux.arm64.Release
, or copy the *.dbg
files from /home/ubuntu/code/runtime/artifacts/bin/coreclr/Linux.arm64.Release
to /home/ubuntu/code/runtime/artifacts/bin/coreclr/Linux.arm64.Release/ilc
.
Thanks, @jkotas I was wondering how to get the symbols. I've updated the original issue with the symbol filled bt.
When running in gdb, I did see warning: the debug information found in "/home/ubuntu/code/runtime/artifacts/bin/coreclr/Linux.arm64.Release/ilc/libclrjit.so.dbg" does not match "/home/ubuntu/code/runtime/artifacts/bin/coreclr/Linux.arm64.Release/ilc/libclrjit.so" (CRC mismatch).
Is that actually an issue?
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.
Author: | Beau-Gosse-dev |
---|---|
Assignees: | - |
Labels: | `area-CodeGen-coreclr`, `untriaged`, `area-NativeAOT-coreclr` |
Milestone: | - |
JIT crash in Rationalizer. cc @dotnet/jit-contrib
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.
Author: | Beau-Gosse-dev |
---|---|
Assignees: | - |
Labels: | `area-CodeGen-coreclr` |
Milestone: | 7.0.0 |
(oops, didn't see the area was changed)
Are there any instructions for cross-building these tests with NativeAOT somewhere?
It should work like any other cross-build. Build Linux arm64 Release NativeAOT
CI job cross-builds. The command line that it uses (needs rootfs setup):
build.sh -ci -arch arm64 -os Linux -s clr.alljits+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime+libs+libs.tests -c Release /p:TestNativeAot=true /p:RunSmokeTestsOnly=true /p:ArchiveTests=true /p:CrossBuild=true /p:MonoLLVMUseCxx11Abi=true
Example of a CI log file: https://dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_apis/build/builds/1849193/logs/2130
Hmm, it is strange, but I am getting an error like
System.Reflection.Tests -> /home/jakob/dev/dotnet/runtime/artifacts/bin/System.Reflection.Tests/Release/net7.0/System.Reflection.Tests.dll
Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
Generating compatible native code. To optimize for size or speed, visit https://aka.ms/OptimizeNativeAOT
EXEC : error : Failed to load type 'System.Array`1' from assembly 'System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' [/home/jakob/dev/dotnet/runtime/src/libraries/System.Reflection/tests/System.Reflection.Tests.csproj]
Internal.TypeSystem.TypeSystemException+TypeLoadException: Failed to load type 'System.Array`1' from assembly 'System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'
at Internal.TypeSystem.ThrowHelper.ThrowTypeLoadException(ExceptionStringID id, String typeName, String assemblyName) in /home/jakob/dev/dotnet/runtime/src/coreclr/tools/Common/TypeSystem/Common/ThrowHelper.cs:line 17
at Internal.TypeSystem.ResolutionFailure.Throw() in /home/jakob/dev/dotnet/runtime/src/coreclr/tools/Common/TypeSystem/Common/ResolutionFailure.cs:line 93
at Internal.TypeSystem.Ecma.EcmaModule.GetType(String nameSpace, String name, NotFoundBehavior notFoundBehavior) in /home/jakob/dev/dotnet/runtime/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaModule.cs:line 344
at ILCompiler.NoMetadataBlockingPolicy.InitializeArrayOfTType(TypeSystemEntity contextEntity) in /home/jakob/dev/dotnet/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/NoMetadataBlockingPolicy.cs:line 31
at ILCompiler.NoMetadataBlockingPolicy.IsBlocked(MethodDesc method) in /home/jakob/dev/dotnet/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/NoMetadataBlockingPolicy.cs:line 51
at ILCompiler.RootingServiceProvider.AddReflectionRoot(MethodDesc method, String reason) in /home/jakob/dev/dotnet/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/RootingServiceProvider.cs:line 45
at ILCompiler.RdXmlRootProvider.ProcessMethodDirective(IRootingServiceProvider rootProvider, ModuleDesc containingModule, TypeDesc containingType, XElement methodElement) in /home/jakob/dev/dotnet/runtime/src/coreclr/tools/aot/ILCompiler/RdXmlRootProvider.cs:line 199
at ILCompiler.RdXmlRootProvider.ProcessTypeDirective(IRootingServiceProvider rootProvider, ModuleDesc containingModule, XElement typeElement) in /home/jakob/dev/dotnet/runtime/src/coreclr/tools/aot/ILCompiler/RdXmlRootProvider.cs:line 132
at ILCompiler.RdXmlRootProvider.ProcessAssemblyDirective(IRootingServiceProvider rootProvider, XElement assemblyElement) in /home/jakob/dev/dotnet/runtime/src/coreclr/tools/aot/ILCompiler/RdXmlRootProvider.cs:line 83
at ILCompiler.RdXmlRootProvider.AddCompilationRoots(IRootingServiceProvider rootProvider) in /home/jakob/dev/dotnet/runtime/src/coreclr/tools/aot/ILCompiler/RdXmlRootProvider.cs:line 47
at ILCompiler.Compilation..ctor(DependencyAnalyzerBase`1 dependencyGraph, NodeFactory nodeFactory, IEnumerable`1 compilationRoots, ILProvider ilProvider, DebugInformationProvider debugInformationProvider, DevirtualizationManager devirtualizationManager, IInliningPolicy inliningPolicy, Logger logger) in /home/jakob/dev/dotnet/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Compilation.cs:line 64
at ILCompiler.ILScannerBuilder.ToILScanner() in /home/jakob/dev/dotnet/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ILScannerBuilder.cs:line 83
at ILCompiler.Program.Run(String[] args) in /home/jakob/dev/dotnet/runtime/src/coreclr/tools/aot/ILCompiler/Program.cs:line 833
at ILCompiler.Program.Main(String[] args) in /home/jakob/dev/dotnet/runtime/src/coreclr/tools/aot/ILCompiler/Program.cs:line 1090
on multiple machines and configurations I have tried now.
This error means that a wrong corelib is being used. The libraries partition build tends to stick to first corelib that it has seen, so if you build one flavor of the runtime and then a different flavor of the runtime, the libraries partition will still use the corelib for the first flavor of the runtime.
Either build using above command line from a clean environment; or manually copy over the right corelib (the one from artifacts\bin\coreclr\linux.arm64.Release\aotsdk
) to where the build script expects it.
Thanks, that seemed to be it. I was trying to get it to use a checked build.
Removing /p:RunSmokeTestsOnly=true
which I assume is necessary to build System.Reflection.Tests unfortunately led me to more problems with the build quickly exhausting my machine of memory with 20+ instances of ilc
each consuming multiple gigabytes of memory. For posterity, after some binlog digging I ended up with
../../../../dotnet.sh build -c Release /p:TestNativeAot=true /p:CrossBuild=true /p:TargetOS=Linux /p:TargetArchitecture=arm64 /p:BuildArchitecture=x64
to cross build just the one test project. Unfortunately, this does not repro the issue for me on a cross-build.
The strange part here is that the failing source line (the one which the segfault is occurring on) is accessing a pointer that has been null-checked just a couple of lines before, so there is probably either some uninitialized data access going on, or some native heap corruption/use after free going on.
I will try to see if I can manage to build this on a ARM64 host machine.
I was not able to reproduce this on either Ubuntu 20.04 or Ubuntu 18.04 when building through WSL on my Surface Pro X.
@Beau-Gosse-dev can you share a dump including the contents of the artifacts/bin/coreclr/Linux.arm64.Release/ilc
folder?
This issue has been marked needs-author-action
and may be missing some important information.
I'll try to reproduce this again and get a dump next week.
This issue has been marked needs-author-action
and may be missing some important information.
Hmm, seems like a new issue was introduced since this was opened. For some reason I can't even build "clr.alljits" and get this:
[ 34%] Building CXX object utilcode/CMakeFiles/utilcodestaticnohost.dir/longfilepathwrappers.cpp.o
[ 34%] Building CXX object utilcode/CMakeFiles/utilcodestaticnohost.dir/yieldprocessornormalized.cpp.o
[ 34%] Building CXX object utilcode/CMakeFiles/utilcodestaticnohost.dir/hostimpl.cpp.o
[ 34%] Linking CXX static library libutilcodestaticnohost.a
[ 34%] Built target utilcodestaticnohost
CMakeFiles/Makefile2:1649: recipe for target 'CMakeFiles/alljits.dir/rule' failed
make[1]: *** [CMakeFiles/alljits.dir/rule] Error 2
Makefile:182: recipe for target 'alljits' failed
make: *** [alljits] Error 2
~/code/runtime/src/coreclr
Failed to build "CoreCLR component".
/home/ubuntu/code/runtime/src/coreclr/runtime.proj(61,5): error MSB3073: The command ""/home/ubuntu/code/runtime/src/coreclr/build-runtime.sh" -arm64 -release -os Linux -component alljits" exited with code 2.
Build FAILED.
Does anyone know what that issue might be from or how to debug it further?
@Beau-Gosse-dev the lines that have the info on how things failed might be further up in the log. Could you share a bit more of it please?
@hoyosjs full output is below
If it matters, this is a clean Ubuntu VM with these things installed:
sudo bash -c "$(wget -O - https://apt.kitware.com/kitware-archive.sh)"
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
sudo apt-get install -y cmake llvm-9 clang build-essential python curl git lldb-6.0 liblldb-6.0-dev libunwind8 libunwind8-dev gettext libicu-dev liblttng-ust-dev libssl-dev libnuma-dev libkrb5-dev zlib1g-dev ninja-build git cmake libkrb5-dev libssl-dev libicu-dev liblttng-ust-dev
llvm-objcopy-6.0: Unknown command line argument '--only-keep-debug'. Try: '/usr/bin/llvm-objcopy-6.0 -help'
@janvorli @am11 This seems to be caused by the recent changes to use llvm-objcopy
The issue is llvm-objcopy-6.0
doesn't have the --only-keep-debug
argument somehow. This is likely from https://github.com/dotnet/runtime/pull/71446. Looks like a quick workaround might be to only leave one hyphen in https://github.com/dotnet/runtime/blob/f54ec728b0c836f6633b9ce52c9fe97452e5232e/eng/native/functions.cmake#L429 (or remove it altogether, the help scpecifies:
-only-keep-debug Currently ignored. Only for compatibility with GNU objcopy.
Can we require some more recent llvm version as minimum instead?
We can also detect if the argument is missing and adjust the condition accordingly. e.g. this is how we detect if dsymutil
supports --minimize
on macOS: https://github.com/dotnet/runtime/blob/eb123a7f77a9e453b2a67e99525598ece83bcabe/eng/native/functions.cmake#L405-L413
This was llvm-objcopy 8, we probably need to check dynamically if we are going to support using RedHat's version of clang for RHEL7 (llvm 7)
Assuming the above is resolved now. Are you still able to reproduce the issue and can you share a dump if so @Beau-Gosse-dev?
This issue has been marked needs-author-action
and may be missing some important information.
So it seems like the second issue, not being able to build clr.alljits, is fixed. However, the original issue still reproduces. Here is the new BT from gdb (seems the same as the original issue).
@jakobbotsch When you say you want the dump is that generated in gdb with generate-core-file ~/dumpfile
? When call that, the output file is 4.6G, is that what you want me to upload? I may need to find a new place to host it, I'm not sure GitHub allows files that big.
Thread 25 ".NET ThreadPool" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xffbed95301c0 (LWP 12746)]
GenTreeUseEdgeIterator::AdvanceCall<0> (this=0xffbed952e4b8) at /home/ubuntu/runtime/src/coreclr/jit/gentree.cpp:9660
9660 m_statePtr = arg->GetLateNext();
(gdb) bt
#0 GenTreeUseEdgeIterator::AdvanceCall<0> (this=0xffbed952e4b8) at /home/ubuntu/runtime/src/coreclr/jit/gentree.cpp:9660
#1 GenTreeUseEdgeIterator::GenTreeUseEdgeIterator (this=0xffbed952e4b8, node=0xffbe8c0276f0) at /home/ubuntu/runtime/src/coreclr/jit/gentree.cpp:9367
#2 0x0000ffff7d4746b4 in Compiler::fgGetFirstNode (tree=0xffbe8c0276f0) at /home/ubuntu/runtime/src/coreclr/jit/flowgraph.cpp:4222
#3 0x0000ffff7d53a028 in Rationalizer::RewriteNodeAsCall (this=0xffbed952e718, use=0xffbe8c028760, parents=..., callHnd=<optimized out>, entryPoint=..., arg1=0xffbe8c022640, arg2=0x0) at /home/ubuntu/runtime/src/coreclr/jit/rationalize.cpp:163
#4 0x0000ffff7d53b3f4 in Rationalizer::RewriteIntrinsicAsUserCall (this=0xffbed952e4b8, use=<optimized out>, parents=...) at /home/ubuntu/runtime/src/coreclr/jit/rationalize.cpp:244
#5 Rationalizer::DoPhase()::RationalizeVisitor::PreOrderVisit(GenTree**, GenTree*) (this=<optimized out>, use=<optimized out>, user=<optimized out>) at /home/ubuntu/runtime/src/coreclr/jit/rationalize.cpp:818
#6 GenTreeVisitor<Rationalizer::DoPhase()::RationalizeVisitor>::WalkTree(GenTree**, GenTree*) (this=<optimized out>, use=<optimized out>, user=<optimized out>) at /home/ubuntu/runtime/src/coreclr/jit/compiler.h:10668
#7 0x0000ffff7d53b608 in GenTreeVisitor<Rationalizer::DoPhase()::RationalizeVisitor>::WalkTree(GenTree**, GenTree*) (this=<optimized out>, use=<optimized out>, user=<optimized out>) at /home/ubuntu/runtime/src/coreclr/jit/compiler.h:11010
#8 0x0000ffff7d53b240 in Rationalizer::DoPhase (this=0xffbed952e718) at /home/ubuntu/runtime/src/coreclr/jit/rationalize.cpp:888
#9 0x0000ffff7d5351e8 in Phase::Run (this=0xffbed952e718) at /home/ubuntu/runtime/src/coreclr/jit/phase.cpp:61
#10 0x0000ffff7d44466c in Compiler::compCompile (this=<optimized out>, methodCodePtr=<optimized out>, methodCodeSize=<optimized out>, compileFlags=<optimized out>) at /home/ubuntu/runtime/src/coreclr/jit/compiler.cpp:5061
#11 0x0000ffff7d445cbc in Compiler::compCompileHelper (this=0xffbe8c01ec28, classPtr=<optimized out>, compHnd=<optimized out>, methodInfo=0xffbed952edf0, methodCodePtr=0xffbed952ebc0, methodCodeSize=0xffbed952edd0, compileFlags=0xffbed952ebd8)
at /home/ubuntu/runtime/src/coreclr/jit/compiler.cpp:6785
#12 0x0000ffff7d4453c8 in Compiler::compCompile(CORINFO_MODULE_STRUCT_*, void**, unsigned int*, JitFlags*)::$_11::operator()(Compiler::compCompile(CORINFO_MODULE_STRUCT_*, void**, unsigned int*, JitFlags*)::__JITParam*) const (this=<optimized out>, __JITpParam=<optimized out>)
at /home/ubuntu/runtime/src/coreclr/jit/compiler.cpp:5931
#13 Compiler::compCompile (this=0xffbe8c01ec28, classPtr=0x4381e8, methodCodePtr=0xffbed952ebc0, methodCodeSize=0xffbed952edd0, compileFlags=0xffbed952ebd8) at /home/ubuntu/runtime/src/coreclr/jit/compiler.cpp:5950
#14 0x0000ffff7d446590 in jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*)::$_13::operator()(jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*)::__JITParam*) const::{lambda(jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*)::$_13::operator()(jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*)::__JITParam*) const::__JITParam*)#1}::operator()(jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*)::$_13::operator()(jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*)::__JITParam*) const::__JITParam*) const (this=<optimized out>, __JITpParam=<optimized out>)
at /home/ubuntu/runtime/src/coreclr/jit/compiler.cpp:7431
#15 jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*)::$_13::operator()(jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*)::__JITParam*) const (this=<optimized out>, __JITpParam=<optimized out>) at /home/ubuntu/runtime/src/coreclr/jit/compiler.cpp:7456
#16 jitNativeCode (methodHnd=0x4381e0, classPtr=0x4381e8, compHnd=0xffbed952ec20, methodInfo=0xffbed952edf0, methodCodePtr=0xffbed952ebc0, methodCodeSize=0xffbed952edd0, compileFlags=0xffbed952ebd8, inlineInfoPtr=0x0) at /home/ubuntu/runtime/src/coreclr/jit/compiler.cpp:7458
#17 0x0000ffff7d44a8a0 in CILJit::compileMethod (this=<optimized out>, compHnd=0xffbed952ec20, methodInfo=0xffbed952edf0, flags=<optimized out>, entryAddress=<optimized out>, nativeSizeOfCode=0x421210) at /home/ubuntu/runtime/src/coreclr/jit/ee_il_dll.cpp:276
#18 0x0000ffff7d6c4584 in JitCompileMethod (ppException=0xffbed952ede0, pJit=0xffff7d686178 <operator new(unsigned long, CILJitSingletonAllocator const&)::CILJitBuff>, thisHandle=0xffbed952ede8, callbacks=<optimized out>, methodInfo=<optimized out>, flags=<optimized out>,
entryAddress=0xffbed952edd8, nativeSizeOfCode=0xffbed952edd0) at /home/ubuntu/runtime/src/coreclr/tools/aot/jitinterface/jitwrapper.cpp:34
#19 0x0000ffff8078c5e4 in ?? ()
#20 0x0000fffff7a45328 in ?? () from /home/ubuntu/runtime/artifacts/bin/coreclr/Linux.arm64.Release/ilc/libcoreclr.so
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
@jakobbotsch When you say you want the dump is that generated in gdb with
generate-core-file ~/dumpfile
? When call that, the output file is 4.6G, is that what you want me to upload?
Yes, that and the ilc folder contents would be helpful. You might be able to make a smaller repro using --singlemethodtypename
and --singlemethodname
args to ilc, if you can dig out the exact function it is compiling that is causing the problem (that is probably visible in the log if you do a run with --verbose
and --parallelism 1
first).
Looking at the dump clang's codegen for AdvanceCall
looks incorrect. it is skipping a null check that is present in the source code. In fact, it is missing a lot of code present in the source code due to assuming this null check always passes.
I can see that the JIT in the dump you sent me is built with clang-6. Can you try a newer version of clang? The codegen for this function looks completely different for me using clang-9.
Pseudocode from clang-6 from your dump (without symbols):
case 0x6F:
v11 = *(_QWORD **)(a2 + 48);
result = vdupq_n_s64(0LL);
result.n128_u64[0] = (unsigned __int64)sub_FFFF7CC2BC54;
*(_QWORD *)(a1 + 32) = v11;
*(int64x2_t *)a1 = result;
if ( !v11 )
goto LABEL_27;
while ( 1 )
{
*(_QWORD *)(a1 + 24) = v11;
v12 = (_QWORD *)v11[2];
*(_QWORD *)(a1 + 32) = v12;
if ( *v11 )
break;
v11 = v12;
if ( !v12 )
{
LABEL_27:
v13 = *(_QWORD *)(a2 + 56);
result = vdupq_n_s64(0LL);
result.n128_u64[0] = (unsigned __int64)sub_FFFF7CC2CA98;
*(int64x2_t *)a1 = result;
*(_QWORD *)(a1 + 24) = v13 + 8;
*(_QWORD *)(a1 + 32) = *(_QWORD *)(v13 + 24); // segfault here
return result;
}
}
return result;
Pseudocode from clang-9 (with symbols):
case 0x6F:
v14 = *(__int64 **)(a2 + 48);
*(_QWORD *)(result + 32) = v14;
*(_OWORD *)result = (unsigned __int64)GenTreeUseEdgeIterator::AdvanceCall<0>;
while ( v14 )
{
*(_QWORD *)(result + 24) = v14;
v15 = (__int64 *)v14[2];
*(_QWORD *)(result + 32) = v15;
v16 = *v14;
v14 = v15;
if ( v16 )
return result;
}
v17 = *(_QWORD *)(a2 + 56);
*((_QWORD *)&v18 + 1) = 0LL;
*(_QWORD *)(result + 32) = v17;
*(_OWORD *)result = (unsigned __int64)GenTreeUseEdgeIterator::AdvanceCall<1>;
if ( v17 ) // clang-6 codegen is missing this check and assumes it passes
{
*(_QWORD *)(result + 24) = v17 + 8;
*(_QWORD *)(result + 32) = *(_QWORD *)(v17 + 24);
}
else
{
*(_QWORD *)&v18 = GenTreeUseEdgeIterator::AdvanceCall<2>;
*(_OWORD *)result = v18;
v19 = *(_BYTE *)(a2 + 92) & 7;
if ( *(_QWORD *)(a2 + 120) )
{
v20 = (__int64 (__fastcall *)())GenTreeUseEdgeIterator::Terminate;
if ( v19 == 2 )
v20 = GenTreeUseEdgeIterator::AdvanceCall<3>;
*(_QWORD *)result = v20;
*(_QWORD *)(result + 8) = 0LL;
*(_QWORD *)(result + 24) = a2 + 120;
}
else if ( v19 == 2 )
{
*(_OWORD *)result = (unsigned __int64)GenTreeUseEdgeIterator::AdvanceCall<4>;
*((_QWORD *)&v21 + 1) = 0LL;
if ( *(_QWORD *)(a2 + 112) )
{
*v2 = a2 + 112;
}
else
{
*(_QWORD *)&v21 = GenTreeUseEdgeIterator::Terminate;
*(_OWORD *)result = v21;
v23 = *(_QWORD *)(a2 + 128);
v22 = a2 + 128;
if ( v23 )
*v2 = v22;
}
}
else
{
LABEL_43:
*(_DWORD *)(result + 40) = -1;
}
}
return result;
Thanks! I created a new VM and installed clang-9 instead of just "clang" and that fixed the issue. I see that in the Linux Requirements it says clang-9. I must have just installed the default clang after seeing an error that clang was not found.
Notes
./build.sh clr.alljits+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime+libs+libs.tests -rc Release -lc Release /p:TestNativeAot=true
Reproduction Steps
rm -rf /home/ubuntu/code/runtime/artifacts/bin/System.Reflection.Tests/
rm -rf /home/ubuntu/code/runtime/artifacts/obj/System.Reflection.Tests/
cd ~/code/runtime/src/libraries/System.Reflection/tests
../../../../dotnet.sh build /t:Test /p:TestNativeAot=true -c Release -v d
Debugging Steps (after running Reproduction Steps):
cp /home/ubuntu/code/runtime/artifacts/bin/coreclr/Linux.arm64.Release/*.dbg /home/ubuntu/code/runtime/artifacts/bin/coreclr/Linux.arm64.Release/ilc
gdb /home/ubuntu/code/runtime/artifacts/bin/coreclr/Linux.arm64.Release/ilc/ilc
set debug-file-directory /home/ubuntu/code/runtime/artifacts/bin/coreclr/Linux.arm64.Release/ilc
r @"/home/ubuntu/code/runtime/artifacts/obj/System.Reflection.Tests/Release/net7.0/native/System.Reflection.Tests.ilc.rsp"
Error