[Bug 47812] New: Cygwin's strace.exe crashes due to custom TLS corruption
WineHQ Bugzilla
wine-bugs at winehq.org
Wed Sep 25 22:26:15 CDT 2019
https://bugs.winehq.org/show_bug.cgi?id=47812
Bug ID: 47812
Summary: Cygwin's strace.exe crashes due to custom TLS
corruption
Product: Wine
Version: 4.16
Hardware: x86
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: -unknown
Assignee: wine-bugs at winehq.org
Reporter: z.figura12 at gmail.com
Distribution: ---
This is not (as far as I can see) a Wine bug, and it's certainly not worth
fixing, but I'm writing this down here so that someone doesn't go through the
same work to figure it out...
Cygwin, for whatever reason, reimplements TLS by storing things at a fixed
offset from the stack base (i.e. NtCurrentTeb()->Tib.StackBase). Somewhere
along the line this gets corrupted, specifically the _locale member.
I think the assumptions made at [1] with regard to alloca() are just bogus.
There's no guarantee that the returned memory will contain wholly the custom
TLS slot, and I'm not particularly sure why they expect it to remain untouched
after DLL_PROCESS_ATTACH returns.
[1] <https://github.com/Alexpux/Cygwin/blob/master/winsup/cygwin/init.cc#L90>
--
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