# WARNING: DATA RACE
Read at 0x00c0000b4010 by goroutine 7:

- **ID:** `go/data-race-detector`
- **Domain:** go
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The race detector (go test -race / go run -race) found unsynchronized concurrent access to the same memory location. Usually a shared struct field or slice index accessed without a mutex or atomic.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.19 | active | — | — |
| 1.21 | active | — | — |
| 1.22 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   var hits atomic.Int64
hits.Add(1)
n := hits.Load()
   ```
2. **** (97% success)
   ```
   type Counter struct {
    mu sync.Mutex
    n  int
}
func (c *Counter) Inc() { c.mu.Lock(); c.n++; c.mu.Unlock() }
   ```
3. **** (92% success)
   ```
   results := make(chan Result)
go func() { results <- compute() }()
r := <-results // ownership transferred
   ```

## Dead Ends

- **** — Hides the bug; production crashes or corrupts state under real concurrency. (95% fail)
- **** — Does not establish happens-before; race remains and detector still fires. (85% fail)
