Skip to content

tailcall regression with compiled F# #40864

@brettfo

Description

@brettfo

Machine:
Latest Windows 10 x64

Pre-verification:

  1. On a clean machine install latest VS with the following workloads:
    • .NET desktop development
      • Add optional component F# desktop language support
    • .NET Core cross-platform development
  2. Clone https://github.com/dotnet/fsharp and reset to commit 1c1b5ac7eacbbfd79e7277982e15178cecee20b4
  3. Build with .\Build.cmd -c Release
  4. Run test with dotnet test tests\fsharp\FSharpSuite.Tests.fsproj --no-restore --no-build --filter LargeRecordDoesNotStackOverflow -f netcoreapp3.1 -c Release -v n

At this point the test should pass.

Bug repro:

  1. Install latest .NET 5 SDK from here.
  2. Invalidate the .NET 3 SDK and runtime by doing the following:
    • Rename/delete C:\Program Files\dotnet\sdk\3.1.401
    • Rename/delete C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.7
    • Ensure they're not listed via dotnet --list-sdks and dotnet --list-runtimes
  3. Re-run the test from step (4) exactly as above.
    N.b., you may need to alter global.json with the following:
     {
    +  "sdk": {
    +    "version": "5.0.100-preview.7.20366.6"
    +   },
       "tools": {
    -    "dotnet": "3.1.302",
    +    "dotnet": "5.0.100-preview.7.20366.6",
     ...

Result:
Stack overflow

Possibly related to #40581

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions