https://bugs.winehq.org/show_bug.cgi?id=49301
Bug ID: 49301 Summary: pthread_exit hangs on unwind through call_thread_exit_func on arm64 Product: Wine Version: unspecified Hardware: aarch64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: stefan@codeweavers.com Distribution: ---
Created attachment 67309 --> https://bugs.winehq.org/attachment.cgi?id=67309 Workaround
My arm64 Wine build spins in services.exe after starting up anything. The backtrace points into pthread_exit() - see attached file backtrace.txt.
I placed pthread_exit calls throughout the thread creation / shutdown code and it works up to the point where signal_exit_thread() calls call_thread_exit_func(). After call_thread_exit_func() passes control to the C function exit_thread() pthread_exit() will hang.
I previously had this problem only in a gcc wine build (with 8fb8cc03 reverted), but recently, presumably after an update to clang-10, the problem also happens when building Wine with clang. The attached backtrace is from a build with clang 10.
Calling exit_thread() directly from signal_exit_thread() without going through call_thread_exit_func works around the problem. See attached file noasm.diff