zlacker

[parent] [thread] 1 comments
1. tialar+(OP)[view] [source] 2021-07-21 01:36:32
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.

replies(1): >>gpdere+qI
2. gpdere+qI[view] [source] 2021-07-21 09:24:15
>>tialar+(OP)
Of 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.

[go to top]