3 ms·
A Race in Go is Undefined Behaviour. All bets are off, whatever happens, no matter how strange, is OK. If you have a race which definitely only touches some si
by tialaramex 5y ago
A Race in Go is Undefined Behaviour. All bets are off, whatever happens, no matter how strange, is OK.
If you have a race which definitely only touches some simple value like an int and nothing more complicated then Go may be able to promise your problem isn't more widespread - that value is ruined, you can't trust that it makes any sense (now, in the future, or previously), but everything else remains on the up-and-up. However, the moment something complicated is touched by a race, you lose, your program has no defined meaning whatsoever.
- gpderetta 5y agoOf course, but when talking about security, a race in Go would be very hard to exploit. It is a different story in languages meant to run untrusted code of course.