| ▲ | Night_Thastus 4 hours ago | |||||||||||||||||||||||||
Personally, as someone in C and C++ for the last few years, memory access is almost never the root bug. It's almost always logic errors. Not accounting for all paths, not handling edge cases, not being able to handle certain combinations of user or file input, etc. Occasionally an out-of-bounds access pops up, but they're generally so blindingly obvious and easy to fix that it's never been the slow part of bug fixing. | ||||||||||||||||||||||||||
| ▲ | lelanthran 3 hours ago | parent | next [-] | |||||||||||||||||||||||||
I've been programming for long; the ratio of memory errors to logic bugs in production is so low as to be non-existent. My last memory error in C code in production was in 2018. Prior to that it I had a memory error in C code in production in 2007 or 2008. In C++, I eventually gave up trying to ship the same level of quality and left the language altogether. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
| ▲ | taminka 3 hours ago | parent | prev [-] | |||||||||||||||||||||||||
logic errors aren't memory errors, unless you have some complex piece of logic for deallocating resources, which, yeah, is always tricky and should just generally be avoided | ||||||||||||||||||||||||||