Threadsafe stack relocation