Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The goto bugs are often failures to release locks in the error paths, or failure to free some other resource, or sometimes double frees. C++ programs that use RAII locks rarely have these types of issues.

Many casual users never notice these bugs, but if you put a Linux box under enough pressure that some kmalloc fails, it will fall to pieces because the error paths are full of bugs and little-exercised. C has probably the worst error-path control flow of any of the high-level languages.



I am pretty sure that something can go wrong with a bad (partial or missing) rule of 5.


That's why rule of 5 classes are rare in modern C++. But well-written ones help tremendously.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: