[Solved] Changing gcc/g++ version causes segfault [closed]


You should try to use valgrind.

Valgrind is a debugging tool only requiring for your code to be compiled with the -g flag. It’s the best way to spot segmentation fault over a program, or any memory leak.

Think about using valgrind options while debugging (it’s at the bottom of the valgrind report) something like leak-checkfull (I’m not able to run valgrind right now so I can’t tell you exactly what it is).

But whenever I compile my code, I use valgrind with it to check every possible failure. Consider even putting VG in your Makefile rules for more simplicity.

1

solved Changing gcc/g++ version causes segfault [closed]