IT lexicon › Programming › Race detector

Race detector

Programming På svenska → Updated: 2026-11-15

A tool that automatically identifies data races by monitoring which threads access the same memory location without synchronization.

Go includes a built-in race detector (go run -race). It uses instrumentation to log all memory accesses and detects when two or more threads access the same location without a happens-before relationship between them. ThreadSanitizer for C++ works similarly, instrumenting thread primitives and memory operations.

Detectors cannot find all races — only those that actually trigger during execution — but they catch most common bugs. The challenge is keeping false positives low while maintaining acceptable performance overhead.

← Back to the lexicon