Valgrind gives an error for nearly everything (Warning: client switching stacks?)
问题 I'm corrupting memory somehow because my program crashes without error at random places. I'm using valgrind with --leak-check=full , compiling with -O0 -g , and the very first problem it detects is the first line in int main() cout << "reading file" << endl; with ==5089== Warning: client switching stacks? SP change: 0x7ff0004f8 --> 0x7feb7de10 ==5089== to suppress, use: --max-stackframe=4728552 or greater ==5089== Invalid write of size 8 ==5089== at 0x41E107: main (Dgn.cpp:2833) ==5089==