log/slog/internal/buffer — validation proof
Go’s own log/slog/internal/buffer 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 log/slog/internal/buffer row in
Validated Test Packages.
Validated 2026-10-25 · converter 3e3f18925
1 matched · 1 disclosed — Go 1.26.10, windows/amd64, converted package
src/core/log/slog/internal/buffer.
Measured at Release (tiered JIT off), oracle go version go1.26.10 windows/amd64.
Verdicts
| Test | go test |
go2cs |
|---|---|---|
Test |
pass | pass |
TestAlloc |
pass | fail (disclosed) |
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 |
|---|---|---|
TestAlloc |
alloc-count-semantics |
Exact-zero AllocsPerRun assert over the pooled New/WriteString/deferred-Free round-trip: Go’s sync.Pool reuse plus escape analysis keeps the warm path allocation-free. The converted path heap-allocates what Go stack-allocates, the display class and delegate the C# compiler emits for the defer closure and the per-run test closure itself, and golib’s counter charges none of it: every object on the path is compiler-emitted or BCL-internal, so no malloc count exists to compare with the want and zero can never come back. The measurable figure is bytes: 176 per run (880 bytes over 5 runs) on windows and linux at go1.24.13 and go1.26.10, which the test prints as got 176 allocs, want 0. |