What is the biggest difference between Garbage Collection and Ownership?

I also wanted to point out that this is simply not true – sorry.

Your experience with small, domain-specific, throw-away, single-developer programs might tell you otherwise, but that is not nearly representative of the whole of software development in general.

Basically half a century has passed since C and C++ were invented, generations of professional programmers were brought up using better or worse teaching materials and practices, and yet, no high-quality, meticuously-developed, non-trivial C or C++ programs exist without at least a few CVEs attributable to UaFs or other kinds of memory corruption.

Dreamweaver had a famous 8k bug. OpenSSL was found to contain dozens of critical errors (you might have heard of Heartbleed). Apple's Security framework presented everyone's favorite "goto fail" vulnerability. The majority of iOS versions has been jailbroken to some degree, which usually involved one or more memory corruption in the kernel or some privileged system component. One of them was a rendering bug stemming from a buffer overflow in the more than widespread FreeType library. I don't think I need to go on – and these are only the issues I remember off the top of my head.

The myth of the sufficiently smart C or C++ programmer is a lie we need to stop telling ourselves.

10 Likes