2 ms·
> It actually accomplishes the opposite; hiding uninitialized values from tools such as Valgrind. My point is that this is a useful tool when I can't use Valgr
by saagarjha 8y ago
> It actually accomplishes the opposite; hiding uninitialized values from tools such as Valgrind.
My point is that this is a useful tool when I can't use Valgrind, or any other sanitizer, due to performance reasons or because they don't exhibit the undefined behavior I was trying to track down. And I wouldn't initialize to zero: I'd use pattern initialization to 0xfa or whatever is the standard " lowest probability byte that represents uninitialized memory but is still likely to fault or produce blatantly wrong results".