https://bugs.winehq.org/show_bug.cgi?id=52213
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com
--- Comment #12 from Rémi Bernon rbernon@codeweavers.com --- Although there's possibly some stack smashing happening, I believe the main issue that makes pthread_exit fail to unwind is that it loses track of the stack pointer in the syscall frame, as we don't have .cfi instructions there and as we're overwriting all the registers and swapping stack pointers.
I think we could let pthread unwind the unix-side stack, by making sure the .cfi instructions point to the unix-side frames only. I implemented such a change and sent it to the M-L as https://source.winehq.org/patches/data/225920, https://source.winehq.org/patches/data/225921, https://source.winehq.org/patches/data/225922, and https://source.winehq.org/patches/data/225923. Somehow what libunwind really (and only) needs is to find %rip, although I'm not completely sure why is that.