Files
okhowang(王沛文) e26b5d4524 fix: add mutex to protect Worker.Platforms from data race
When noCache=true, Platforms() appends to w.WorkerOpt.Platforms.
Concurrent gRPC calls to ListWorkers (each handled in a separate
goroutine) can cause a data race where one goroutine creates matchers
with length N, while another appends new platforms, causing the first
goroutine's range to exceed matchers bounds:

  panic: runtime error: index out of range [81] with length 81

Add sync.Mutex to serialize access to Platforms().

Signed-off-by: okhowang(王沛文) <okhowang@tencent.com>
2026-06-12 10:32:04 +08:00
..
2025-01-13 16:42:48 -08:00