4 ms·
Sure, but crashing cleanly in out-of-memory conditions is generally regard to be "safe" (if undesirable for reliability).
by saagarjha 6y ago
Sure, but crashing cleanly in out-of-memory conditions is generally regard to be "safe" (if undesirable for reliability).
- jorangreef 6y agoI personally like panics and assertions, but the "safety" of the approach would still have to depend on the characteristics of the system. I do not agree that panic-on-OOM should be considered "safe" at a global level hidden within a std lib, where there is no knowledge of the target domain. For example, if an attacker could arbitrarily inject overload to restart rate-limiting processes and then abuse this to trivially brute-force OTP logins. The definition of safety with respect to a resource in general always needs to include the safety of the system as it crosses the threshold i.e. in this case into out-of-memory, so if a system claims memory safety, the first thing I would want to ask is, what about OOMs?
- yellowapple 6y agoIs it? I'd say "crashing cleanly" is oxymoronic; "crashing" strongly implies a failure of the process to clean up after itself after doing so. Any sort of crash can wreak havoc on whatever non-atomic operations were in-flight.