runtime/debug — validation proof

Go’s own runtime/debug test suite, converted to C# by go2cs, built against the converted standard library, run under the Go-semantics test host, and compared verdict for verdict against a clean go test -json baseline of the same sources. This page is generated by the converter from that comparison — it is the evidence behind the runtime/debug row in Validated Test Packages.

Validated 2026-09-30 · converter d616cc686

8 matched · 1 disclosed — Go 1.24.13, windows/amd64, converted package src/core/runtime/debug.

Measured at Release (tiered JIT off), oracle go version go1.24.13 windows/amd64.

Both runtimes skip 1 of the matched tests identically.

Verdicts

Test go test go2cs
TestFreeOSMemory pass fail (disclosed)
TestReadGCStats pass pass
TestSetCrashOutput pass pass
TestSetGCPercent skip skip
TestSetMaxThreadsOvf pass pass
TestStack pass pass
TestWriteHeapDumpFinalizers pass pass
TestWriteHeapDumpNonempty pass pass
TestWriteHeapDumpTypeName pass pass

Disclosed divergences

A disclosed divergence is a specific Go assertion the managed CLR provably cannot satisfy — not a skipped test and not a tolerance. Each one is pinned by exact failure signature in the package’s hand-owned go2cs_test_disclosures.json; a disclosed test that fails any other way is still a hard mismatch.

Test Class Pinned reason
TestFreeOSMemory codegen-liveness the test allocates 32 MB inline in its own frame, clears the only named reference, and then asserts — from inside that same still-running frame — that FreeOSMemory has returned the memory to the OS. Go’s per-safepoint liveness maps drop the allocation at its last use; the CLR reports a frame’s slots live for the frame’s whole lifetime, so the 32 MB is still rooted while the test is looking. Measured by the routing probe as a three-way control: the identical allocation behind a RETURNED call releases 33,689,600 B to the byte, and the inline form does not, invariant under Release and under untiered JIT. The first assert (HeapReleased must increase at all) PASSES on the S2/S3 high-water surface — 3,031,040 B of unrelated memory really is released — which is why the pin is the second assert’s prefix and stops before its run-varying byte counts

Excluded declarations

Declarations filtered from both sides of the comparison, and therefore not claimed above: Benchmark, Fuzz and Example declarations the converted host does not execute, plus any test requiring a capability the managed runtime does not provide — a testing member the host has not implemented, or a platform behavior it provably cannot reproduce. Each is named with the capability it needs.