-
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
System.Runtime.Extensions.Tests: Assertion failed #61359
Comments
Tagging subscribers to this area: @dotnet/area-system-numerics Issue DetailsFailed in: #61323 Click to expand log
|
cc: @tannergooding |
(Libraries Test Run checked coreclr Linux x64 Debug) Guess - it's one of the Half values used as theory data (see BitConverterBase.cs) as it's constructing the test name. |
Failed again in #64851 on linux x64 - console log. Intermittent nature of failure suggests that perhaps some unsafe API operation is not reliable? 🤔 I tried |
We should break this assert into several, and log the values (including the half value.. carefully.) |
Ah, that's the key; otherwise we can potentially run into infinite recursion here (if debug message has Half value). |
I doubt that it would help. It has very high chance to make the repro go away. This is likely either going to be uninitialized variable somewhere or a codegen bug. I will take a look at the crash dump. |
This is a codegen bug in OptimizedTier1 version of The bug manifest itself as test failure only when we switch from QuickJitted version of More details based on the dump from #64851:
|
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsFailed in: #61323 Click to expand log
|
@dotnet/jit-contrib @JulieLeeMSFT This intermittent bug is affecting CI stability. Could you please give it a high priority? |
This sounds suspiciously much like #58373, I will take a look. |
Thanks for the repro! Standalone repro: using System;
using System.Runtime.CompilerServices;
using System.Threading;
public class Test
{
public static void Main()
{
for (int i = 0; i < 100; i++)
{
Console.WriteLine(HalfToInt16Bits((Half)(-3.14f)));
Thread.Sleep(16);
}
}
[MethodImpl(MethodImplOptions.NoInlining)]
public static unsafe short HalfToInt16Bits(Half value)
{
return *((short*)&value);
}
} |
This ensures we normalize returned indirs of locals, even when we fold it into an access of a promoted local's field. This may change a signed indir into access of an unsigned field, which may need a sign-extending cast to be inserted. It is not ideal that fgMorphRetInd can 'lose' this information, but given that it is a specialized optimization it seems the simplest solution is to just rely on the follow-up normalization. Fix dotnet#61359
This ensures we normalize returned indirs of locals, even when we fold it into an access of a promoted local's field. This may change a signed indir into access of an unsigned field, which may need a sign-extending cast to be inserted. It is not ideal that fgMorphRetInd can 'lose' this information, but given that it is a specialized optimization it seems the simplest solution is to just rely on the follow-up normalization. Fix #61359
This ensures we normalize returned indirs of locals, even when we fold it into an access of a promoted local's field. This may change a signed indir into access of an unsigned field, which may need a sign-extending cast to be inserted. It is not ideal that fgMorphRetInd can 'lose' this information, but given that it is a specialized optimization it seems the simplest solution is to just rely on the follow-up normalization. Fix #61359
* Normalize returns after optimizing returned indirs This ensures we normalize returned indirs of locals, even when we fold it into an access of a promoted local's field. This may change a signed indir into access of an unsigned field, which may need a sign-extending cast to be inserted. It is not ideal that fgMorphRetInd can 'lose' this information, but given that it is a specialized optimization it seems the simplest solution is to just rely on the follow-up normalization. Fix #61359 * Conservative fix * Remove spurious diff --------- Co-authored-by: Jakob Botsch Nielsen <jakob.botsch.nielsen@gmail.com>
Failed in: #61323
Click to expand log
The text was updated successfully, but these errors were encountered: