dotnet / dotnet/runtime

ildasm produces different comments in the output on Windows vs Linux

Open
#122,976 1 comment 1 reaction 2 assignees Claimed by @agocke View on GitHub
area-ILTools-coreclr
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

Run ildasm on the System.Runtime assembly from the Microsoft.NetCore.App.Ref 10.0.0 package on both Windows and Linux and compare the output.

```
diff --git a/D:/a/_work/1/s/artifacts/bin/Sbrp.Tests/Release/net10.0/GenerateTests-1767801555/normalized-src/targetPacks/ILsrc/microsoft.netcore.app.ref/10.0.0/ref/net10.0/
System.Runtime.il
b/D:/a/_work/1/s/artifacts/bin/Sbrp.Tests/Release/net10.0/GenerateTests-1767801555/targetPacks/ILsrc/microsoft.netcore.app.ref/10.0.0/ref/net10.0/System.Runtime.il
index e719fceb..afac84a5 100644
--- a/D:/a/_work/1/s/artifacts/bin/Sbrp.Tests/Release/net10.0/GenerateTests-1767801555/normalized-src/targetPacks/ILsrc/microsoft.netcore.app.ref/10.0.0/ref/net10.0/System.
Runtime.il
+++ b/D:/a/_work/1/s/artifacts/bin/Sbrp.Tests/Release/net10.0/GenerateTests-1767801555/targetPacks/ILsrc/microsoft.netcore.app.ref/10.0.0/ref/net10.0/System.Runtime.il
@@ -26609,7 +26609,7 @@
.field /*04000042*/ public static literal float64 Epsilon = float64(4.9406564584124654e-324)
.field /*04000043*/ public static literal float64 MaxValue = float64(1.7976931348623157e+308)
.field /*04000044*/ public static literal float64 MinValue = float64(-1.7976931348623157e+308)
- .field /*04000045*/ public static literal float64 NaN = float64(0xFFF8000000000000) // -nan
+ .field /*04000045*/ public static literal float64 NaN = float64(0xFFF8000000000000) // -nan(ind)
.field /*04000046*/ public static literal float64 NegativeInfinity = float64(0xFFF0000000000000) // -inf
.field /*04000047*/ public static literal float64 NegativeZero = float64(-0.0000000000000000)
.field /*04000048*/ public static literal float64 Pi = float64(3.1415926535897931)
```

Windows produces `// -nan(ind)` where Linux produces `// -nan`

While this is non-functional from an il perspective but it causes headaches in my test scenario that is run on multiple platforms.

I am using version 11.0.0-alpha.1.26055.102

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.