The Wire · Showcase
MATH.ROUND BUG CORRUPTS 5% OF INPUTS. EVENTPIPE LOSES HEAP DATA. SQLCLIENT GOES ASYNC
By RepoJournal · Filed · About .NET
Runtime shipped a critical fix for Math.Round that was silently mangling roughly 5% of all rounding operations across the BCL, while EventPipe's data loss is finally getting a blocking mode to save your GC dumps.
Math.Round(double, digits, mode) and MathF.Round(float, digits, mode) were computing an intermediate multiplication that lost precision, scaling values across rounding boundaries and silently corrupting results [1]. This affected the entire math stack. In parallel, EventPipe's lossy buffer design was dropping GC heap edges during large snapshots, corrupting dotnet-gcdump rebuilds; runtime now ships blocking mode to fix this [2]. SqlClient is shipping async counterparts for Always Encrypted key store providers, removing forced synchronous blocking during queries [5]. Separately, the SDK fixed P/Invoke profiler callbacks that were corrupting the shadow stack by firing spurious ELT events alongside transition callbacks [3]. Operator SDK hit v13.0.0 with breaking changes to leader election scoping and multi-assembly composition [4]. All three .NET LTS/current branches shipped patched builds: 8.0.29, 9.0.18, and 10.0.10 [6] [8] [7].
Action items
- → Pull latest dotnet/runtime immediately. Math.Round fix affects every application doing decimal calculations. dotnet/runtime [immediate]
- → Review dotnet-gcdump workflows. EventPipe blocking mode is now available; non-blocking is no longer default. dotnet/runtime [plan]
- → If using Always Encrypted with custom key stores, audit SqlClient upgrade path for async API adoption. dotnet/SqlClient [plan]
- → Operator SDK upgrade to v13.0.0 requires controller and leader election config review. dotnet/dotnet-operator-sdk [plan]
References
- [1] Fix incorrect rounding in Math.Round and MathF.Round with digits ↗ dotnet/runtime
- [2] [EventPipe] Add Blocking EventPipe Mode ↗ dotnet/runtime
- [3] Don't emit ELT callbacks for P/Invoke methods ↗ dotnet/runtime
- [4] v13.0.0 ↗ dotnet/dotnet-operator-sdk
- [5] Introduce Async API counterparts for AE base class ↗ dotnet/SqlClient
- [6] .NET 8.0.29 ↗ dotnet/efcore
- [7] .NET 10.0.10 ↗ dotnet/efcore
- [8] .NET 9.0.18 ↗ dotnet/efcore