3 ms·
Yeah, I mean, I guess that leaks in general are possible, which would still let you write `forget`. You're right about that. But the unsoundness RC bug still r
by steveklabnik 12y ago
Yeah, I mean, I guess that leaks in general are possible, which would still let you write `forget`. You're right about that.
But the unsoundness RC bug still relies on unsafe code which was written incorrectly.
- sirclueless 12y agoI think you need to split the unsoundness bug, which happens because thread::scoped uses unsafe code, from the "you can write mem::forget in safe code" bug, which is arguably not a bug but is at least an enormous footgun waiting to happen. When the footgun goes off in unsafe code in the standard library, you get use-after-free and memory unsoundness. When the footgun goes off in safe code written by mere humans, you leak arbitrary resources.