3 ms·
>Safe languages will prevent, catch, or at least "nerf" the most dangerous sorts of bugs such as memory errors As a former C++ developer, errors leading to cra
by passivate 5y ago
>Safe languages will prevent, catch, or at least "nerf" the most dangerous sorts of bugs such as memory errors
As a former C++ developer, errors leading to crashes (be it due to memory or otherwise) were always more preferable to me than logic errors or race conditions (which can still happen in Rust) that go unnoticed for months/years. I guess 'danger' here is subjective, but thats my view.
- api 5y agoHow does catching crash bugs lead to more logic bugs? In practice I've never seen this. In any case we're talking about security here where many crash bugs can in fact be catastrophic security vulnerabilities. If it crashes there's a distinct possibility that the bug is exploitable.
- passivate 5y agoThat is not quite what I said. I said I would take a crashing bug over a logic bug. Logic bugs are hard to find because you can't easily test for them. IME, Security vulnerabilities are primarily about functions assuming the input is safe (logic bugs), or file format parsing bugs (logic bugs) or the function being buggy to the point where the caller can poison the stack and/or control EIP. (logic bugs) For each of these types there are some mitigations available at both the OS and hardware level, but I was making a general point about logic vs crashing bugs. > If it crashes there's a distinct possibility that the bug is exploitable. What I mean by crashing is that the program stops executing. Are you saying that crashing bugs make it easier to plant resident code? I'm nota security expert, so I don't quite know what you're referring to.
- pjmlp 5y agoWhen C and C++ segfault we can be considered lucky that it happened, instead of corrupting data, that might even be stored somewhere else and go months unnoticed.