logoalt Hacker News

simonask • yesterday at 4:04 PM • 2 replies • view on HN

There is no memory safety without freedom from data races. One is a prerequisite of the other. This is why languages like C# throw exceptions on unsynchronized concurrent access to some container types, and treat all property accesses as atomic.


Replies

typical182 • yesterday at 4:21 PM

From the former head of the Go security team [1]:

> 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.

[1] https://news.ycombinator.com/item?id=44672003

[2] https://news.ycombinator.com/item?id=44672371

➕ show 1 reply
shikck200 • yesterday at 4:17 PM

Are you saying any language that does not promise data-race freedom is memory unsafe? That would rule out almost every programming language.

➕ show 1 reply