# WARNING: DATA RACE
Write at 0x... by goroutine 7:
  main.main.func1()
      /main.go:12 +0x...
Previous read at 0x... by main goroutine:
  main.main()
      /main.go:9 +0x...

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

## Root Cause

The race detector (-race) found unsynchronized access to shared memory between goroutines.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   var mu sync.Mutex
mu.Lock()
counter++
mu.Unlock()
   ```
2. **** (90% success)
   ```
   results := make(chan int, 1)
go func() { results <- compute() }()
v := <-results
   ```

## Dead Ends

- **** — Hides the bug; production will still corrupt data. (95% fail)
- **** — Reduces but does not eliminate race; detector still flags it. (90% fail)
