My C++ program is crashing recently, ASAN is showing me a stack-overflow error. I have recently rewritten my program to use multiple threads and since then the program crash