Comment by saagarjha
3 days ago
But those segfaults will either be memory memory safe or your lines will contain “unsafe” or “unchecked” somewhere.
3 days ago
But those segfaults will either be memory memory safe or your lines will contain “unsafe” or “unchecked” somewhere.
You can make a fully safe segfault the same way you can in go. Swapping a base reference between two child types. The data pointer and vft pointer aren't updated atomically, so a thread safety issue becomes a memory safety one.
This is no longer allowed with strict concurrency
When did that happen? Or is it something I have to turn on? I had Claude write a swift version of the go version a few months ago and it segfaulted.
Edit: Ah, the global variable I used had a warning that it isn't concurrency safe I didn't notice. So you can compile it, but if you treat warnings as errors you'd be fine.