lundi 21 juin 2021

Program crashing at exit during destructor call, but valgrind doesn't show any invalid free error

I ran valgrind but it doesn't show any invalid-free() error. Although there are lots of Memory leaks error (Majorly 'still reachable' ones) But I am unable to understand why would memory leak cause crash while destructing. I am using below valgrind command:

valgrind -v --log-file=./valgrind.log --tool=memcheck --leak-check=yes --show-leak-kinds=all --verbose --show-reachable=yes <executable>

What could be the reasons for this crash?

Aucun commentaire:

Enregistrer un commentaire