| ▲ | afdbcreid 9 hours ago | |||||||||||||||||||||||||
Rust is susceptible to segfaults when overflowing the stack. Is Rust not memory safe then? Of course, Go allows more than that, with data races it's possible to reach use after free or other kinds of memory unsafety, but just segfaults don't mark a language memory unsafe. | ||||||||||||||||||||||||||
| ▲ | cyberax 9 hours ago | parent [-] | |||||||||||||||||||||||||
Go is most emphatically NOT memory-safe. It's trivially easy to corrupt memory in Go when using gorotuines. You don't even have to try hard. This stems from the fact that Go uses fat pointers for interfaces, so they can't be atomically assigned. Built-in maps and slices are also not corruption-safe. In contrast, Java does provide this guarantee. You can mutate structures across threads, and you will NOT get data corruption. It can result in null pointer exceptions, infinite loops, but not in corruption. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||