-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arm64 codegen bug. #56522
Comments
@briansull could you please investigate this Arm64 VN bug? cc @dotnet/jit-contrib |
I will investigate |
This doesn't appear to me to be a ValueNumbering bug. |
|
Do you mean that |
I looked at I believe that there is data corruption taking place when |
I have included the Arm64 codegen for Windows AltJit, I don't see anything that is wrong with it.
And see if someone is modifying
|
@briansull so your analysis was done using an altjit? |
Yes, that is correct. |
I have investigated it more and I believe there is a problem with non-volatile floating register restore after an exception that happens in C++ on arm64 Linux/OSX. I have discussed it with @davidwrighton and he suggested moving it to the runtime area for now. So I suspect that if we throw an exception like this: runtime/src/coreclr/vm/jithelpers.cpp Line 670 in f598846
we don't restore non-volatile d8 after we get to the parent method that was using it. I also was able to shrink the test and repro the issue without any reflection/IL generation involved as David asked but now it reproduces only on arm64 Mac, not on arm64 Linux, the source is here: The expected output is:
and if you want to repro it on arm64 Linux you should use the original test and shrink it after: @janvorli could you please take a look as an exception expert? |
* Fix ARM64 floating point registers unwinding in PAL We were not unwinding the non-volatile floating point registers at all (not transferring them between the CONTEXT and ucontext_t before and after the unw_step). That causes crashes on arm64 Unix in some of the tests since JIT now generates code that uses e.g. the D8 register and a runtime code that was throwing an exception was using it too. * Fix non-OSX arm64, remove test csproj patch * Fix Linux arm64 * Fix Linux arm64 - now really Fixes #56522
Failed again in runtime-coreclr jitstress 20210807.1 Failed test:
Error message:
|
Such tests produces different results with
COMPlus_JitDoValueNumber=0
andCOMPlus_JitDoValueNumber=1
:The issue is in
TestConvertFromFloatToU8
.It looks like we do wrong CSE in
TestConvertFromFloatToU8
and we pass0
instead oflong.MinValue
in some cases:found during work on #56450.
It is not a minimum repro but if I replace
GenerateTest
body with something trivial it goes away, so I am not sure what happens there.The text was updated successfully, but these errors were encountered: