[Bug 48274] wine-staging 4.21 fails to run 64-bit programs

WineHQ Bugzilla wine-bugs at winehq.org
Fri Dec 13 07:53:46 CST 2019


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

--- Comment #9 from Paul Gofman <gofmanp at gmail.com> ---
Created attachment 65958
  --> https://bugs.winehq.org/attachment.cgi?id=65958
force stack alignment in syscall dispatcher

Looks like syscall thunks violate stack alignment. 

The segfaulting instruction in NtQuerySystemInformation is like this:

vmovaps %xmm6,0x1090(%rsp)

This is aligned 16-byte SSE register load which segfaults on most CPUs if the
actual address is unaligned.

The "good" builds have explicit stack alignments in functions' prologues:

--
    7bcad2e1:   48 83 e4 f0             and    $0xfffffffffffffff0,%rsp
    7bcad2e5:   48 81 ec 90 10 00 00    sub    $0x1090,%rsp
    7bcad2ec:   c7 84 24 40 01 00 00    movl   $0x0,0x140(%rsp)
    7bcad2f3:   00 00 00 00 
    7bcad2f7:   c5 f8 29 b4 24 90 10    vmovaps %xmm6,0x1090(%rsp)
--

The library attached in the previous comment does not have an alignment but is
still using the same aligned stores / loads, assuming x64 ABI which requires
rsp + 8 to be 16 bytes aligned on function entry.

Does the attached patch help?

-- 
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