3 ms·
Memory safety bugs are second only to segfaults in terms of importance.
by kiitos 2y ago
Memory safety bugs are second only to segfaults in terms of importance.
- logicchains 2y agoIn terms of the actual bugs encountered when developing modern C++ applications, logic bugs vastly outnumber segfaults and memory safety bugs, which are quite rare when you're writing business logic.
- bluGill 2y agoI fully agree. Memory safety issues are a small minority of C++ issues. Memory safety issues when you get them are very difficult to track down, and often have much broader/worse effects.
- erik_seaberg 2y agoWith an MMU, segfaults cause pretty abrupt and obvious failures for straying outside the heap or stack. Violating memory safety may cause subtle and unpredictable errors even in correct functions, which is a lot more dangerous.
- kiitos 2y agoNo argument there!
- vitiral 2y agoSegfaults are a result of violating memory safety. They are the BEST case since you can actually detect the program yolo'd Far worse is your program starts corrupting your data and suddenly you are executing a routine you had no intention of ever executing
- kiitos 2y agoNot really. Not all memory safety violations result in segfaults, and not all segfaults are the result of memory safety violations.
- vitiral 2y agoWhich segfaults are NOT the result of memory safety violations?
- kiitos 2y agoUh, most? Memory safety is about data races and concurrent access violations. De-referencing a nil pointer isn't a memory safety violation, for example. But I guess if you re-define memory safety to mean anything that can produce a segfault then sure.