Open
Description
Description
Fail to open an dll built with .NET 9.0 /clr:netcore.
It works fine with .NET 8.0, but with .NET 9.0 it only works during debugging and if Suppress JIT optimization on module load is enabled. It never works in release.
It is somehow connected to the main application loading the dll. It works if the main app is written in C#.
Reproduction Steps
Created a simple app to reproduce the problem.
DllExport
Run DebugTestApp to see the problem. Debug uses NetApp, which works.
Works fine if using .NET 8, but crashes if using .NET 9.
Expected behavior
As with .NET 8.0
Actual behavior
'TestApp.exe' (Win32): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.2\clrjit.dll'. Symbol loading disabled by Include/Exclude setting.
Exception thrown at 0x00007FFB66DF53EB (clrjit.dll) in TestApp.exe: 0xC000008E: Floating-point division by zero (parameters: 0x0000000000000000, 0x0000000000001924).
Regression?
Works with .NET 8
Known Workarounds
Enable Suppress JIT optimization on module load in VS to get it working during debugging within VS. It never works in release.
Configuration
No response
Other information
No response