3 ms·
It's been quite a while since I worked with golang details but I seem to remember writes to the same map from multiple goroutines being UB if GOMAXPROCS>1? Did
by EE84M3i 2y ago
It's been quite a while since I worked with golang details but I seem to remember writes to the same map from multiple goroutines being UB if GOMAXPROCS>1? Did they eventually solve that, or is that excluded from the definition of memory-safe language because it's a different type of safety?
- gpm 2y agoThis is my understanding (both that that can occur, and that it does not count as memory safe). I called out the types I did in my post specifically because they're the types where data races can result in arbitrary memory corruption (in the actual implementation, the spec is arguably not even that strict). Per https://go.dev/ref/mem#restrictions https://go.dev/ref/mem#restrictions (the same linke as in Steve's reply to me)
- steveklabnik 2y agoI believe that post 1.6, the runtime will try and detect this, but it's not my area of expertise.