3 ms·
That doesn't really explain why it is a footgun.
by IshKebab 4mo ago
That doesn't really explain why it is a footgun.
- man8alexd 4mo agoThe last paragraph: > On the modern desktop, where programmers don't care about failing malloc(), disabling overcommit is shooting yourself in the foot. As you can observe, the memory allocations start failing long before the memory is exhausted.
- senfiaj 4mo agoSo it's a footgun because a lot of low quality software?
- man8alexd 4mo agoIs Firefox low quality?
- senfiaj 4mo agoWell, if Firefox also works on other OSes, it probably should gracefully handle failing allocations, isn't it?
- man8alexd 4mo agoNo, it doesn't handle failing allocations gracefully - https://unix.stackexchange.com/questions/797841/firefox-died-with-vm-enough-memory-not-enough-memory-for-the-allocation-des#comment1534064_797841 https://unix.stackexchange.com/questions/797841/firefox-died...
- silon42 4mo agoI lost cookies several times on disk-full condition...
- IshKebab 4mo agoIf a memory allocations fails with strict mode then you'll get a null pointer returns and some kind of crash or panic (in code that doesn't handle it properly). If it fails with the default mode the whole process will get killed by the OS. Is that really much better?
- man8alexd 4mo agoOOM is better. If a program doesn't handle ENOMEM properly, then its state is unpredictable and can lead to data corruption.
- IshKebab 4mo agoI don't think it's as simple as that. Killing a program can have unintended consequences too, e.g. corrupting files they were in the middle of writing.