2 ms·
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 R
by jeffbee 6y ago
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.
- scoutt 6y agoI am pretty sure that something can go wrong with a bad (partial or missing) rule of 5.
- steerablesafe 6y agoThat's why rule of 5 classes are rare in modern C++. But well-written ones help tremendously.