sync — validation proof

Go’s own sync 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 sync row in Validated Test Packages.

Validated 2026-09-22 · converter f9a4b088f

46 matched · 6 disclosed — Go 1.24.13, windows/amd64, converted package src/core/sync.

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

Verdicts

Test go test go2cs
TestCompareAndSwap_NonExistingKey pass pass
TestConcurrentClear pass pass
TestConcurrentRange pass pass
TestCondBroadcast pass pass
TestCondCopy pass pass
TestCondSignal pass pass
TestCondSignalGenerations pass pass
TestCondSignalStealing pass pass
TestIssue40999 pass pass
TestMapClearOneAllocation pass fail (disclosed)
TestMapMatchesDeepCopy pass pass
TestMapMatchesHashTrieMap pass pass
TestMapMatchesRWMutex pass pass
TestMapRangeNestedCall pass pass
TestMapRangeNoAllocations pass fail (disclosed)
TestMutex pass pass
TestMutexFairness pass pass
TestMutexMisuse pass pass
TestNilPool pass pass
TestNilPool/Get pass pass
TestNilPool/Put pass pass
TestOnce pass pass
TestOnceFunc pass pass
TestOnceFuncGoexit pass pass
TestOnceFuncPanic pass pass
TestOnceFuncPanicNil pass pass
TestOnceFuncPanicTraceback pass pass
TestOncePanic pass pass
TestOnceValue pass pass
TestOnceValuePanic pass pass
TestOnceValues pass pass
TestOnceValuesPanic pass pass
TestOnceXGC pass fail (disclosed)
TestOnceXGC/OnceFunc pass fail (disclosed)
TestOnceXGC/OnceValue pass fail (disclosed)
TestOnceXGC/OnceValues pass fail (disclosed)
TestParallelReaders pass pass
TestPool pass pass
TestPoolChain pass pass
TestPoolDequeue pass pass
TestPoolGC pass pass
TestPoolNew pass pass
TestPoolRelease pass pass
TestPoolStress pass pass
TestRLocker pass pass
TestRWMutex pass pass
TestRace pass pass
TestSemaphore pass pass
TestWaitGroup pass pass
TestWaitGroupAlign pass pass
TestWaitGroupMisuse pass pass
TestWaitGroupRace 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
TestMapClearOneAllocation alloc-count-semantics at-most-one AllocsPerRun assert over sync.Map.Clear (allocs > 1 errors, so the want is at most ONE object per run). The managed shim reported BYTES, not a count: measured 8,960 allocated BYTES over 10 run(s) ... BYTES PER RUN, not an allocation count. The go2cs runtime allocation counter charged none of it, so every object on this path was allocated outside golib (a compiler-emitted closure in converted code, or a BCL internal) and NO COUNT IS AVAILABLE. A byte figure cannot be compared with an object want at any allocation behavior, which is the ladder’s incomparable-unit arm: nothing to retire, and no plan, because the entry does not assert that the path allocates too much – it records that the instrument cannot answer the question the test asks. Note why the shim does not simply report zero: its counter charged nothing, and reporting that zero would be a FALSE PASS against a want of one. SIGNATURE IS WANT-FREE deliberately: this declaration is a 1.24 RENAME of 1.23.12’s TestMapClearNoAllocations and the want moved 0 -> 1 with it, so a signature carrying the want would stop matching the moment sync is reconverted at 1.24.13.
TestMapRangeNoAllocations alloc-count-semantics want-zero AllocsPerRun assert over sync.Map.Range with a func(key, value any) bool callback. Same incomparable-unit arm as TestMapClearOneAllocation: the shim reported measured 1,520 allocated BYTES over 10 run(s) ... BYTES PER RUN, not an allocation count. The go2cs runtime allocation counter charged none of it, so no object count exists to compare with the want and the figure is byte-derived by construction. Nothing to retire and no plan. Unlike its sibling this declaration is UNCHANGED across 1.23.12 and 1.24.13 (same name, allocs > 0, want 0), so it carries no rename; the signature is still want-free for consistency with the sibling and because a want-bearing signature buys nothing.
TestOnceXGC aggregate no failure text of its own — the roll-up of this test’s disclosed subtests
TestOnceXGC/OnceFunc codegen-liveness The test asserts its own frame’s buf is collectible while the frame is still running. sync.OnceFunc DOES drop the wrapped function (measured: the backing array is released after the first call), but the test’s own f := fn(buf) passes the 32-byte slice header BY VALUE, so the x64 ABI makes the caller materialize an address-exposed stack temp; an address-exposed slot is not lifetime-tracked and the CLR reports it live for the whole method, pinning the array until the subtest RETURNS. Go’s per-safepoint liveness maps release the caller’s copy at its last use. Not satisfiable at any layer go2cs owns — it is the CLR’s GC-info conservatism, and it holds in fully optimized code, not just under the non-optimizing JIT.
TestOnceXGC/OnceValue codegen-liveness Same as TestOnceXGC/OnceFunc: the by-value slice argument in the test’s own body is reported live for the whole frame by the CLR’s GC info, so the finalizer cannot become due while the test is looking
TestOnceXGC/OnceValues codegen-liveness Same as TestOnceXGC/OnceFunc: the by-value slice argument in the test’s own body is reported live for the whole frame by the CLR’s GC info, so the finalizer cannot become due while the test is looking

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.