> I have never seen real Go code (i.e. not code written purposefully to be exploitable) that was exploitable due to a data race.
And from tptacek in that same discussion [2]:
> The fact is that Go doesn't admit memory corruption vulnerabilities, and the way you know that is the fact that there are practically zero exploits for memory corruption vulnerabilities targeting pure Go programs, despite the popularity of the language.
Race conditions in general are another matter, and aren’t generally considered a requirement (though you can certainly create nasty bugs).
Thread a = new Thread(() -> x++);
Thread b = new Thread(() -> x++);
a.start();
b.start();Go does not have that.
(Of course also Java may suffer from memory safety issues on system boundaries to unsafe code and due to JVM bugs.)