3 ms·
Being able to run programs under Valgrind is kind of a luxury. Kernel / embedded developers can't really do that. If you have faith your compiler will warn/er
by loeg 8y ago
Being able to run programs under Valgrind is kind of a luxury. Kernel / embedded developers can't really do that.
If you have faith your compiler will warn/error on use of uninitialized variables (and GCC/Clang seem to warn about it pretty reliably these days, but C is an old language and compilers certainly have not always warned about it), go ahead and continue that practice. In my experience, when comparing accidental zero initialization to accidental undefined behavior, I think usually the accidental zero is easier to understand and correct when your tools are (maybe!) GDB. If you have valgrind, that's a different story.
- flukus 8y ago> Being able to run programs under Valgrind is kind of a luxury. Kernel / embedded developers can't really do that. But they can run large parts of the code in tests and those test can be run under valgrind.
- loeg 8y agoWell, it's theoretically possible. And that would be nice. But it isn't the reality.