In 16 years of Go's existence, neither Google nor the community has solved
the race detection problem without CGO. ThreadSanitizer requires CGO_ENABLED=1,
which makes it unusable for Docker scratch images, cloud functions,
cross-compilation, and embedded systems.
We demonstrated a working concept in pure Go:
- Detector is implemented (FastTrack algorithm, vector clocks, shadow memory)
- 359/359 tests pass
- Real races are detected
Issue #76786 was not a proposal to merge into upstream. We were gauging
community reaction to see if anyone actually needs this. And we found out —
yes, they do (rr compatibility, CGO_ENABLED=0, cross-compilation).
The problem is not the detector itself, but the integration. The current
AST-based approach is a proof of concept. With proper Go runtime integration,
this would work 100% — the compiler already generates runtime.raceread/racewrite
calls.
About "AI vibe-slop": AI tools are professional force multipliers for engineers,
not a replacement for expertise. Critics haven't proposed anything themselves
to solve this 16-year-old problem.
We're actively improving:
- v0.7.1-v0.7.2 fixed issues #15, #16, #17 reported by @glycerine
- Phase 2 will improve instrumentation via go/types and SSA
Related issues:
- #15: Test command flags fix —
https://github.com/kolkov/racedetector/issues/15 - #16: CGO file handling —
https://github.com/kolkov/racedetector/issues/16 - #17: Stack trace display —
https://github.com/kolkov/racedetector/issues/17 - #20: False positives reduction —
https://github.com/kolkov/racedetector/issues/20 Constructive bug reports welcome:
https://github.com/kolkov/racedetector/issues