> ... because valgrind point out ...

You should replace (slow) valgrind with (fast) address-sanatizer.
Simply tell GCC (or clang) to compile with:  -fsanitize=address  -fno-
omit-frame-pointer

Reply via email to