cpp – valgrind – Invalid read of size 8
Your program seems to have big mess and memory is getting corrupted. This is is bit difficult to find by looking out your code snippet. However as you have mentioned in your question that you are able to attach your program using Valgrind. So you may want to attach your program(a.out). $ valgrind –tool=memcheck –db-attach=yes … Read more