Hacker News new | ask | show | jobs
by momo26 35 days ago
Debugging in C is soooo hard. When I was writing Malloc Lab in system course, there were uncountable undefined and out of range :(
2 comments

Yet, debugging memory corruption issues in C and C++ code with modern compiler toolchains and memory debugging tools is infinitely easier than 25 years ago.

(e.g. just compiling with address sanitizer and using static analyzers catch pretty much all of the 'trivial' memory corruption issues).

I think vice versa - C is so simply, that debugging it is just a pleasant walk.

Especially compared with modern languages with lambdas/exceptions/virtual functions and so on.

The one thing I see can make it harder is function pointers.