https://bugs.winehq.org/show_bug.cgi?id=34558
--- Comment #19 from Anastasius Focht focht@gmx.net --- Hello again,
since I wasn't specific about the actual contenders ... the code to make virtual.c critical section uninterruptible by signals is one to look at. The signal set (array) eats 128 bytes stack in NtAllocateVirtualMemory(). Since static storage class is not feasible here, TLS could be an option. This alone saves enough space to let the protection work (already tested). There are multiple other options to reduce stack usage here though.
Anyway, I think the placement of the SEH registration record ~0x400 bytes above stack top is unintended and actually a bug in the protection code that never surfaces on Windows due to different stack usage.
Regards