3 ms·
But clang complains, it's not about just one tool. test.c:8:9: warning: array index 18 is past the end of the array (which contains 16 elements) [-Warray
by 2trill2spill 9y ago
But clang complains, it's not about just one tool.
test.c:8:9: warning: array index 18 is past the end of the array (which contains
16 elements) [-Warray-bounds]
y[18] = 3; // Valgrind thinks this is OK.
^ ~~
- klodolph 9y agoThe snippet is a demonstration of the limitations of Valgrind, specifically. It would be trivial to change the code so it has the same behavior but doesn't trigger the Clang warning.