logoalt Hacker News

JoeAltmaieryesterday at 5:33 PM3 repliesview on HN

Maybe it's more complicated than that? With allocate/delete discipline, C can be fairly safe memory-wise (written a million lines of code in C). But automated package managers etc can bring in code under the covers, and you end up with something you didn't ask for. By that point of view, we reverse the conclusion.


Replies

nemothekidyesterday at 9:13 PM

>can be fairly safe memory-wise (written a million lines of code in C)

We are currently in a thread, where a major application has a heap corruption error in its CSS parser, and it's not even rare for such errors to occur. This doesn't seem true.

>But automated package managers etc can bring in code under the covers, and you end up with something you didn't ask for.

Last year there was a backdoor inserted into xz that was only caught because someone thought their CPU usage a little too high. I don't think the whole "C is safer because people don't use dependencies" is actually sound.

nagaiaidayesterday at 6:55 PM

yes, people often invoke "simply write safer c" but that doesn't make it any more realistic of a proposition in aggregate as we keep seeing.

stackghostyesterday at 6:53 PM

>With allocate/delete discipline, C can be fairly safe memory-wise (written a million lines of code in C)

The last 40-50 years have conclusively shown us that relying on the programmer to be disciplined, yourself included, does not work.