3 ms·
> If you've got a war story about a security-relevant memory corruption vulnerability you managed to introduce into a Rust codebase (that wasn't in straight-up
by eloff 5y ago
> If you've got a war story about a security-relevant memory corruption vulnerability you managed to introduce into a Rust codebase (that wasn't in straight-up `unsafe` code), I'd be interested in hearing more about it.
No, they're in unsafe code. Except Go where you don't get memory safety with some kinds of race conditions. I'm debugging a segfault in Rust today as it turns out. I guarantee it's in unsafe code. But I have some unsafe code. A database would also definitely have quite a bit of unsafe code.
It's a lot better than the situation in C. But rewrites always introduce bugs. And sqlite is so well written and tested, it's not a low quality code base. I don't think a rewrite makes sense here, it'd be better to improve the existing code to make it safer. That's my opinion anyway.