You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Area-Compiler-CodeGenIlxGen, ilwrite and things at the backendBugImpact-High(Internal MS Team use only) Describes an issue with extreme impact on existing code.
PS D:\repr\ReprExe> dotnet run
-600316336
PS D:\repr\ReprExe> dotnet run
-1424497392
PS D:\repr\ReprExe> dotnet run
-1959269956
PS D:\repr\ReprExe> dotnet run
-34085460
PS D:\repr\ReprExe> dotnet run
-1411848676
PS D:\repr\ReprExe> dotnet run
-851778836
Suspicious ref. The ptr.ToString call is ValueType.ToString() (which is what F# normally emits for integers with UoM), so I am guessing this might be returning a memory address.
Known workarounds
string function or strip UoM first or remove <Nullable>enable</Nullable>.
The MethInfoWithModifiedReturnType (what was used to have ToString return a non nullable string ) case in BuildMethodCall was recursively
calling BuildMethodCall again, which re-invoked TakeObjAddrForMethodCall on
already-addressed object arguments. This created double-indirection
(byref<byref>) for value types.
Area-Compiler-CodeGenIlxGen, ilwrite and things at the backendBugImpact-High(Internal MS Team use only) Describes an issue with extreme impact on existing code.
Activity
T-Gro commentedon Mar 16, 2026
@kerams : Intuition was correct.
The MethInfoWithModifiedReturnType (what was used to have
ToStringreturn a non nullablestring) case in BuildMethodCall was recursivelycalling BuildMethodCall again, which re-invoked TakeObjAddrForMethodCall on
already-addressed object arguments. This created double-indirection
(byref<byref>) for value types.
Fix BuildMethodCall double address-taking for UoM value types (#19435)
Fix UoM ToString codegen with checknulls (#19440)