From 5ff5c7d8973294498a1ede0a789b753b31fc5936 Mon Sep 17 00:00:00 2001 From: George Payne Date: Mon, 6 Jul 2026 15:55:36 +0200 Subject: [PATCH] Run Go binding tests under -race Possible since #265 removed the uintptr->pointer handle conversion that checkptr fataled on. Beyond data races, -race enables checkptr, turning any future integer-handle-in-pointer-slot regression into a deterministic fatal at the conversion site instead of a rare GC crash (UI-1813). The suite goes from ~0.5s to ~1.6s; race-instrumented artifacts land in the Go build cache, so CI steady state pays a couple of seconds. --- bindings/go/justfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bindings/go/justfile b/bindings/go/justfile index da4e871b..a71da9bf 100644 --- a/bindings/go/justfile +++ b/bindings/go/justfile @@ -7,9 +7,11 @@ init: # Run tests. The `dev` build tag adds a build-dir rpath to the cgo # link so the binary finds the runtime at the published path - see -# gaffer_dev.go. +# gaffer_dev.go. -race doubles as a checkptr gate on the FFI: an integer +# session handle leaking into a pointer-typed slot fatals deterministically +# here instead of crashing the GC once in a blue moon (UI-1813). test: - CGO_ENABLED=1 go test -tags dev -v ./... + CGO_ENABLED=1 go test -tags dev -race -v ./... # Format code and apply lint fixes fix: