[Bug 52213] Thread crashes when pthread_exit is called in a SIGQUIT handler

WineHQ Bugzilla wine-bugs at winehq.org
Tue Feb 8 03:07:17 CST 2022


https://bugs.winehq.org/show_bug.cgi?id=52213

Rémi Bernon <rbernon at codeweavers.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rbernon at codeweavers.com

--- Comment #12 from Rémi Bernon <rbernon at 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.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list