Skip to content
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

Test failure: JIT\\Methodical\\Overflow\\FloatOvfToInt2_do\\FloatOvfToInt2_do.cmd #51380

Closed
BruceForstall opened this issue Apr 16, 2021 · 6 comments · Fixed by #51401
Closed
Assignees
Labels
arch-x86 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs os-windows untriaged New issue has not been triaged by the area owner
Milestone

Comments

@BruceForstall
Copy link
Member

@BruceForstall BruceForstall added this to the 6.0.0 milestone Apr 16, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI untriaged New issue has not been triaged by the area owner labels Apr 16, 2021
@BruceForstall
Copy link
Member Author

    JIT\Methodical\Overflow\FloatOvfToInt2_ro\FloatOvfToInt2_ro.cmd [FAIL]
      
      Return code:      1
      Raw output file:      C:\h\w\A68B093A\w\B3CB0A04\e\JIT\Methodical\Reports\JIT.Methodical\Overflow\FloatOvfToInt2_ro\FloatOvfToInt2_ro.output.txt
      Raw output:
      BEGIN EXECUTION
       "C:\h\w\A68B093A\p\corerun.exe" FloatOvfToInt2_ro.dll 
      Test failed
      Expected: 100
      Actual: 112
      END EXECUTION - FAILED
      FAILED
      Test Harness Exitcode is : 1
      To run the test:
      > set CORE_ROOT=C:\h\w\A68B093A\p
      > C:\h\w\A68B093A\w\B3CB0A04\e\JIT\Methodical\Overflow\FloatOvfToInt2_ro\FloatOvfToInt2_ro.cmd
      Expected: True
      Actual:   False
      Stack Trace:
           at JIT_Methodical._Overflow_FloatOvfToInt2_ro_FloatOvfToInt2_ro_._Overflow_FloatOvfToInt2_ro_FloatOvfToInt2_ro_cmd()
      Output:
        
        Return code:      1
        Raw output file:      C:\h\w\A68B093A\w\B3CB0A04\e\JIT\Methodical\Reports\JIT.Methodical\Overflow\FloatOvfToInt2_ro\FloatOvfToInt2_ro.output.txt
        Raw output:
        BEGIN EXECUTION
         "C:\h\w\A68B093A\p\corerun.exe" FloatOvfToInt2_ro.dll 
        Test failed
        Expected: 100
        Actual: 112
        END EXECUTION - FAILED
        FAILED
        Test Harness Exitcode is : 1
        To run the test:
        > set CORE_ROOT=C:\h\w\A68B093A\p
        > C:\h\w\A68B093A\w\B3CB0A04\e\JIT\Methodical\Overflow\FloatOvfToInt2_ro\FloatOvfToInt2_ro.cmd
    JIT\Methodical\Overflow\FloatOvfToInt2_do\FloatOvfToInt2_do.cmd [FAIL]
      
      Return code:      1
      Raw output file:      C:\h\w\A68B093A\w\B3CB0A04\e\JIT\Methodical\Reports\JIT.Methodical\Overflow\FloatOvfToInt2_do\FloatOvfToInt2_do.output.txt
      Raw output:
      BEGIN EXECUTION
       "C:\h\w\A68B093A\p\corerun.exe" FloatOvfToInt2_do.dll 
      Test failed
      Expected: 100
      Actual: 112
      END EXECUTION - FAILED
      FAILED
      Test Harness Exitcode is : 1
      To run the test:
      > set CORE_ROOT=C:\h\w\A68B093A\p
      > C:\h\w\A68B093A\w\B3CB0A04\e\JIT\Methodical\Overflow\FloatOvfToInt2_do\FloatOvfToInt2_do.cmd
      Expected: True
      Actual:   False
      Stack Trace:
           at JIT_Methodical._Overflow_FloatOvfToInt2_do_FloatOvfToInt2_do_._Overflow_FloatOvfToInt2_do_FloatOvfToInt2_do_cmd()
      Output:
        
        Return code:      1
        Raw output file:      C:\h\w\A68B093A\w\B3CB0A04\e\JIT\Methodical\Reports\JIT.Methodical\Overflow\FloatOvfToInt2_do\FloatOvfToInt2_do.output.txt
        Raw output:
        BEGIN EXECUTION
         "C:\h\w\A68B093A\p\corerun.exe" FloatOvfToInt2_do.dll 
        Test failed
        Expected: 100
        Actual: 112
        END EXECUTION - FAILED
        FAILED
        Test Harness Exitcode is : 1
        To run the test:
        > set CORE_ROOT=C:\h\w\A68B093A\p
        > C:\h\w\A68B093A\w\B3CB0A04\e\JIT\Methodical\Overflow\FloatOvfToInt2_do\FloatOvfToInt2_do.cmd
  Finished:    JIT.Methodical.XUnitWrapper
=== TEST EXECUTION SUMMARY ===
   JIT.Methodical.XUnitWrapper  Total: 590, Errors: 0, Failed: 2, Skipped: 0, Time: 321.650s

@BruceForstall
Copy link
Member Author

This appears to be due to #50450 (reverting that change fixes the problem).

@SingleAccretion @briansull @tannergooding

@tannergooding
Copy link
Member

This is likely the same as #51346 and the test is covering some undefined behavior that varies between platforms. #47478 tracks the work to normalize those results which @davidwrighton was coming up with a plan for.

I believe the options are:

  1. Disable the tests that are dependent on UB and re-enable them once Determine the strategy that should be used by the Jit when folding implementation-defined casts #47478 is resolved and the folding behavior is deterministic
  2. Revert Handle casts done via helpers and fold overflow operations in value numbering #50450 until the above is resolved
  3. Add a new commit ontop of Handle casts done via helpers and fold overflow operations in value numbering #50450 that refuses to fold values that are strictly UB (and therefore hardware dependent) under pre-jit (there shouldn't be a concern when doing proper jitting for the current machine)

I think which we do depends on if we think #47478 is being definitively fixed for .NET 6.

@tannergooding
Copy link
Member

For reference on what values have UB, it should be the following when converting floating-point to integral:

  • NaN
  • PositiveInfinity
  • NegativeInfinity
  • Anything greater than *.MaxValue or less than *.MinValue

Additionally when converting integral to floating-point:

  • Anything greater than long.MaxValue on x86

@BruceForstall
Copy link
Member Author

I believe the options are...

My only comment is that whatever is chosen, the tests need to be passing in the CI by tonight.

@SingleAccretion
Copy link
Contributor

SingleAccretion commented Apr 16, 2021

Disabling for pre-jit only will not be enough to solve #51346 and the related issues as those are caused by the fact that MSVC x86 doesn't agree with our dynamic codegen. Disabling the folding in general will be cheap as the logic for that was added in #50450 (it is what that PR does for checked conversions), except for the x86 long -> floating point case.

In the meantime, I will revert the part of #50450 that is causing the failures.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-x86 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs os-windows untriaged New issue has not been triaged by the area owner
Projects
None yet
4 participants