2 ms·
There have been efforts to create bounds checked compilers for C. And split stacks as well. Both of those solve 90% of these sorts of problems. I think the rea
by Gibbon1 7y ago
There have been efforts to create bounds checked compilers for C. And split stacks as well. Both of those solve 90% of these sorts of problems.
I think the real problem is
a) C and C++ need a divorce. Because the things that you would do to really fix C make it incompatible with C++.
b) The senior maintainers of the gcc compiler need to be replaced with people willing to take these issues seriously. Right now they are focused on how fast their micro benchmarks run at the expense of everything else.
- pjmlp 7y agoC and C++ had already a dispute. C++ community mostly adopts ISO C libraries post C89 and everything that has safer alternatives in C++ has been left out. C style coding is discouraged in modern teaching materials for C++. Signed integer arithmetic has been partially fixed. Core guidelines are being pushed and for C++23 there are a couple of papers regarding improving the whole UB stuff.
- roca 7y ago> Both of those solve 90% of these sorts of problems. A lot less than 90% in the graphs at https://www.zdnet.com/article/microsoft-70-percent-of-all-security-bugs-are-memory-safety-issues/ https://www.zdnet.com/article/microsoft-70-percent-of-all-se.... Use-after-free and type-confusion bugs definitely aren't addressed by bounds-checking or split-stack approaches; many heap corruption bugs aren't either.