I am trying to track a memory leak in a C ++ program using valgrind. The program is compiled with g ++ and can be run without any errors. Unfortunately, valgrind changes the behavior of my program so that it crashes after you select a runtime error. Since this failure occurs before the relevant parts of the code are reached, I have no way to track a memory leak.
The whole problem is illustrated by the connected console output.
myUser@computer :~$ ./myProgram input.xml Processing... Finished successfully... ---------------------- Hit Enter to continue... myUser@computer :~$ valgrind --leak-check=yes --log-file=valgrindLog ./myProgram input.xml Processing... myProgram-error: Not working Polymorphism. Base class method called instead of derived class method. End-of-myProgram-error. terminate called after throwing an instance of 'char const*' Aborted myUser@computer :~$ g++ -dumpversion 4.4.5 myUser@computer :~$ valgrind --version valgrind-3.6.0.SVN-Debian myUser@computer :~$ uname -r 2.6.35-30-generic myUser@computer :~$ cat /etc/*-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.10 DISTRIB_CODENAME=maverick DISTRIB_DESCRIPTION="Ubuntu 10.10"
source share