-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
Description
When I to .ToString() on my Int128, it reads out memory and then crashes.
When I do string interpolation on my Int128, it throws an exception and crashes.
Clearly, this is not intended functionality.
Reproduction Steps
- Run
Console.WriteLine(new Int128(18446744073709551613, 18446744073709551604).ToString());- Run
Console.WriteLine($"A={new Int128(18446744073709551613, 18446744073709551604)})");(This is literally my whole program now because I wanted to make sure it wasn't something else)
Expected behavior
Prints a number and doesn't crash ;)
Actual behavior
Regression?
No response
Known Workarounds
No response
Configuration
.NET 7 RC 1
Windows 10 x64 v10.0.19044.1949
Running in Debug mode
Also tested on macOS 12.6 x64 with .NET 7 Preview 7, got slightly different output (below):
Other information
It's probably missing a \0 at the end based on that ridiculous console output. idk. Also unsure if the string interpolation one has a secondary issue as well or not.
Edit: it (above) being one of the helper method that converts to a string. This could be why since it may just keep reading random memory when constructing the string until it hits a \0 char (ie. 2x 0 bytes - low chance hence why I see AVEs instead) or an AVE/NRE.



