http://bugs.winehq.org/show_bug.cgi?id=27680
Summary: 64-BIT Aion: Unhandled page fault at address Product: Wine Version: 1.3.23 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: critical Priority: P2 Component: ntdll AssignedTo: wine-bugs@winehq.org ReportedBy: Acidphase@gmail.com
Created an attachment (id=35414) --> (http://bugs.winehq.org/attachment.cgi?id=35414) Debugger Dump
Tried to load up Aion's 64-bit client not sure if people want to tackle this but figure it would help someone in the 64-bit end of development.
I built the wine from the git source tree and I used the Directx9 dll overrides required to run the 32-bit version of Aion.
http://bugs.winehq.org/show_bug.cgi?id=27680
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |minor
--- Comment #1 from Austin English austinenglish@gmail.com 2011-07-03 13:32:51 CDT --- Not critical. Marking as minor, since there's an easy workaround (use the 32-bit version).
http://bugs.winehq.org/show_bug.cgi?id=27680
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |win64 CC| |adys.wh@gmail.com Component|ntdll |-unknown
http://bugs.winehq.org/show_bug.cgi?id=27680
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|64-BIT Aion: Unhandled page |64 bit Aion client crashes |fault at address |on load
http://bugs.winehq.org/show_bug.cgi?id=27680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Status|UNCONFIRMED |NEW URL| |http://dl.dropbox.com/u/461 | |37118/Aion-2.7-GameForge-20 | |-01-2012.zip CC| |focht@gmx.net Component|-unknown |ntdll Ever Confirmed|0 |1
--- Comment #2 from Anastasius Focht focht@gmx.net 2012-04-01 15:09:21 CDT --- Hello,
confirming, it's still happening within NtQueryInformationProcess().
Old backtrace from bug reporter, wine-1.3.23:
--- snip --- =>0 0x00007f22cfe66379 NtQueryInformationProcess+0x59(ProcessHandle=0xffffffffffffffff, ProcessInformationClass=ProcessDebugObjectHandle, ProcessInformation=0x23fcf0, ProcessInformationLength=0x8, ReturnLength=0x0(nil)) [/home/****/wine64/dlls/ntdll/../../../wine-git/dlls/ntdll/process.c:112] in ntdll (0x000000000023f4c0) 1 0x000000000058e09e in aion.bin (+0x18e09d) (0x000000000023f4c0) 2 0x000000000058e09e in aion.bin (+0x18e09d) (0x000000000023f4c0) 3 0x00007f22cfe10000 _init+0x5e7() in ntdll<elf> (0x000000000023f4c0) 0x00007f22cfe66379 NtQueryInformationProcess+0x59 [/home/*****/wine64/dlls/ntdll/../../../wine-git/dlls/ntdll/process.c:112] in ntdll: movq %mm4,%mm6 --- snip ---
It got worse now ... the unwinding goes into recursion, no backtrace.
--- snip --- 0026:Starting process L"Z:\home\focht\Downloads\bin64\aion.bin" (entryproc=0x54cd41) 0026:Call KERNEL32.LoadLibraryA(0022fc20 "kernel32.dll") ret=00590e14 0026:Ret KERNEL32.LoadLibraryA() retval=7b820000 ret=00590e14 0026:Call KERNEL32.LoadLibraryA(0022fc24 "ntdll.dll") ret=00590e14 0026:Ret KERNEL32.LoadLibraryA() retval=7fbe1aa50000 ret=00590e14 0026:Call KERNEL32.IsDebuggerPresent() ret=00590e14 0026:Ret KERNEL32.IsDebuggerPresent() retval=00000000 ret=00590e14 0026:Call KERNEL32.CheckRemoteDebuggerPresent(ffffffffffffffff,0022fc30) ret=00590e14 0026:Ret KERNEL32.CheckRemoteDebuggerPresent() retval=00000001 ret=00590e14 0026:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7fbe1aaa7e39 ip=7fbe1aaa7e39 tid=0026 0026:trace:seh:raise_exception rax=00007fbe1aa5ab30 rbx=000000001a065f83 rcx=00007fbe1ad20d20 rdx=0000000000050347 0026:trace:seh:raise_exception rsi=00000000005116d8 rdi=000000000022f290 rbp=000000000022f228 rsp=000000000022f0f8 0026:trace:seh:raise_exception r8=000000000022f260 r9=0000000000000008 r10=0000000000000008 r11=000000399ab7c680 0026:trace:seh:raise_exception r12=000000000058ffe7 r13=0000000000000000 r14=0000000000000000 r15=0000000000000000 0026:trace:seh:dwarf_virtual_unwind function 7fbe1aaa7e39 base 0x7fbe1aaa7e27 cie 0x7fbe1aafeaa8 len 14 id 0 version 1 aug 'zR' code_align 1 data_align -8 retaddr %rip 0026:trace:seh:execute_cfa_instructions 7fbe1aaa7e27: DW_CFA_def_cfa %rsp, 8 0026:trace:seh:execute_cfa_instructions 7fbe1aaa7e27: DW_CFA_offset %rip, -8 0026:trace:seh:dwarf_virtual_unwind fde 0x7fbe1ab0d618 len 54 personality (nil) lsda (nil) code 7fbe1aaa7e27-7fbe1aaa823a 0026:trace:seh:execute_cfa_instructions 7fbe1aaa7e27: DW_CFA_advance_loc 1 0026:trace:seh:execute_cfa_instructions 7fbe1aaa7e28: DW_CFA_def_cfa_offset 16 0026:trace:seh:execute_cfa_instructions 7fbe1aaa7e28: DW_CFA_offset %rbp, -16 0026:trace:seh:execute_cfa_instructions 7fbe1aaa7e28: DW_CFA_advance_loc 3 0026:trace:seh:execute_cfa_instructions 7fbe1aaa7e2b: DW_CFA_def_cfa_register %rbp 0026:trace:seh:execute_cfa_instructions 7fbe1aaa7e2b: DW_CFA_advance_loc 19 ... 0026:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7fbe1aabffd1 ip=7fbe1aabffd1 tid=0026 0026:trace:seh:raise_exception rax=e9e1c4e0e8fffef4 rbx=000000007b878618 rcx=0000000000000006 rdx=fffffffffffcafd1 0026:trace:seh:raise_exception rsi=0000000000000006 rdi=0000000000134140 rbp=0000000000134120 rsp=0000000000134120 0026:trace:seh:raise_exception r8=00007fbe1ad34cb7 r9=0000000000000018 r10=00000000ffff8000 r11=000000399ab7c680 0026:trace:seh:raise_exception r12=000000007b8b6b19 r13=0000000000000000 r14=0000000000000000 r15=0000000000000000 0026:err:seh:setup_exception stack overflow 2992 bytes in thread 0026 eip 00007fbe1aac1263 esp 0000000000130a50 stack 0x130000-0x132000-0x230000 --- snip ---
The app code is heavily obfuscated and has some anti-debugging checks after entry.
After bypassing two anti-debugging checks a third one is done: NtQueryInformationProcess for ProcessDebugObjectHandle.
--- snip --- Wine-dbg>info regs Register dump: rip:0000000000590e12 rsp:000000000023f268 rbp:000000000023f400 eflags:00000202 ( - -- I - - - ) rax:00007f6cea80ac00 rbx:000000001a065f83 rcx:ffffffffffffffff rdx:000000000000001e rsi:00000000005116d8 rdi:000000000023f290 r8:000000000023fc30 r9:0000000000000008 r10:0000000000000008 r11:0000000000000246 r12:000000000058ffe7 r13:0000000000000000 r14:0000000000000000 r15:0000000000000000
Wine-dbg>x/10x 0x00007f6cea80ac00 0x00007f6cea80ac00 NtQueryInformationProcess: e5894855 48535657 07c8ec81 290f0000 0x00007f6cea80ac10 NtQueryInformationProcess+0x10: ffff40b5 bd290fff ffffff50 85290f44 0x00007f6cea80ac20 NtQueryInformationProcess+0x20: ffffff60 8d290f44 --- snip ---
The registers RCX, RDX, R8, R9 are used for integer and pointer arguments (in that order left to right)
0xffffffffffffffff, 000000000000001e, 000000000023fc30, 0000000000000008
Additional arguments are pushed onto the stack (right to left)
Stepping through the code is blind flying on some locations as winedbg can't disassemble some instructions (after "sub $0x7c8,%rsp" for example). You need objdump disassembly side-by-side.
--- snip --- Wine-dbg>si NtQueryInformationProcess () at /home/focht/projects/wine/wine-git/dlls/ntdll/process.c:112 0x00007fc857e66c00 NtQueryInformationProcess [/home/focht/projects/wine/wine-git/dlls/ntdll/process.c:112] in ntdll: pushq %rbp 112 { Wine-dbg>si 0x00007fc857e66c01 NtQueryInformationProcess+0x1 [/home/focht/projects/wine/wine-git/dlls/ntdll/process.c:112] in ntdll: movq %rsp,%rbp 112 { Wine-dbg> 0x00007fc857e66c04 NtQueryInformationProcess+0x4 [/home/focht/projects/wine/wine-git/dlls/ntdll/process.c:112] in ntdll: pushq %rdi 112 { Wine-dbg> 0x00007fc857e66c05 NtQueryInformationProcess+0x5 [/home/focht/projects/wine/wine-git/dlls/ntdll/process.c:112] in ntdll: pushq %rsi 112 { Wine-dbg> 0x00007fc857e66c06 NtQueryInformationProcess+0x6 [/home/focht/projects/wine/wine-git/dlls/ntdll/process.c:112] in ntdll: pushq %rbx 112 { Wine-dbg> 0x00007fc857e66c07 NtQueryInformationProcess+0x7 [/home/focht/projects/wine/wine-git/dlls/ntdll/process.c:112] in ntdll: subq $0x7c8,%rsp 112 { Wine-dbg>si 0x00007fc857e66c0e NtQueryInformationProcess+0xe [/home/focht/projects/wine/wine-git/dlls/ntdll/process.c:112] in ntdll: 112 { Wine-dbg>info reg Register dump: rip:00007fc857e66c0e rsp:000000000023ea78 rbp:000000000023f258 eflags:00000316 ( - -- IT -A-P- ) rax:00007fc857e66c00 rbx:000000001a065f83 rcx:ffffffffffffffff rdx:000000000000001e rsi:00000000005116d8 rdi:000000000023f290 r8:000000000023fc30 r9:0000000000000008 r10:0000000000000008 r11:0000000000000246 r12:000000000058ffe7 r13:0000000000000000 r14:0000000000000000 r15:0000000000000000 Wine-dbg>si err:seh:setup_exception stack overflow 4656 bytes in thread 002c eip 00007fc857e87263 esp 00000000001403d0 stack 0x140000-0x142000-0x240000 Process of pid=002b has terminated --- snip ---
Running objdump gives:
--- snip --- 000000007bc73c00 <NtQueryInformationProcess>: 7bc73c00: 55 push %rbp 7bc73c01: 48 89 e5 mov %rsp,%rbp 7bc73c04: 57 push %rdi 7bc73c05: 56 push %rsi 7bc73c06: 53 push %rbx 7bc73c07: 48 81 ec c8 07 00 00 sub $0x7c8,%rsp 7bc73c0e: 0f 29 b5 40 ff ff ff movaps %xmm6,-0xc0(%rbp) 7bc73c15: 0f 29 bd 50 ff ff ff movaps %xmm7,-0xb0(%rbp) 7bc73c1c: 44 0f 29 85 60 ff ff movaps %xmm8,-0xa0(%rbp) 7bc73c23: ff 7bc73c24: 44 0f 29 8d 70 ff ff movaps %xmm9,-0x90(%rbp) 7bc73c2b: ff 7bc73c2c: 44 0f 29 55 80 movaps %xmm10,-0x80(%rbp) 7bc73c31: 44 0f 29 5d 90 movaps %xmm11,-0x70(%rbp) 7bc73c36: 44 0f 29 65 a0 movaps %xmm12,-0x60(%rbp) 7bc73c3b: 44 0f 29 6d b0 movaps %xmm13,-0x50(%rbp) 7bc73c40: 44 0f 29 75 c0 movaps %xmm14,-0x40(%rbp) 7bc73c45: 44 0f 29 7d d0 movaps %xmm15,-0x30(%rbp) 7bc73c4a: 48 89 4d 10 mov %rcx,0x10(%rbp) 7bc73c4e: 89 55 18 mov %edx,0x18(%rbp) 7bc73c51: 4c 89 45 20 mov %r8,0x20(%rbp) 7bc73c55: 44 89 4d 28 mov %r9d,0x28(%rbp) 7bc73c59: c7 85 3c ff ff ff 00 movl $0x0,-0xc4(%rbp) 7bc73c60: 00 00 00 7bc73c63: c7 85 38 ff ff ff 00 movl $0x0,-0xc8(%rbp) --- snip ---
Looking at the history of "signal_x86_64.c" there were some changes to unwinding code on 64 bits.
http://source.winehq.org/git/wine.git/history/HEAD:/dlls/ntdll/signal_x86_64...
I found a download with 64-bit part only - not full client - sufficient enough to reproduce the bug (http://www.aionsource.com/topic/129292-instructions-for-the-64bit-client/)
Debugging notes:
b LoadLibraryA (hit two times) ... b 0x0000000000590e12 (obfuscator API callout -> si+c until win64 API entries are seen) Cheat IsDebuggerPresent() and CheckRemoteDebuggerPresent(). The next win64 API call will be NtQueryInformationProcess( ... ProcessDebugObjectHandle).
Regards
http://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #3 from Alexandre Julliard julliard@winehq.org 2012-04-02 05:18:28 CDT --- Looks like that stupid app misaligns the stack.
http://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #4 from Acidphase Acidphase@gmail.com 2012-04-02 11:46:28 CDT --- Wow, been a while since I've tried. I'm not sure if NCsoft (West) reinstated 64-bit clients. I know while back they yanked it claiming that that Korea yanked it. Only to find out this was a lie, nice eh Koreans have been using 64-bit client now for nearly 2 years lol.
The original complaint was that MAC users were having problems with the 64-bit version so technically in the west it never really went "live". I had posted several tutorials for allot of nerfs and technical issues dealing with 64-bit client among other things but specifically 64-bit client.
I had stopped playing the game so all the posts are old now however they should still be there my main was Terza from Siel server you're welcome to see what had been posted about the 64-bit client from me and other people in the community.
I may take a look when it goes live for free to play be shame to let my OP characters go waist. I just got tired of NCWest lying, not fixing things, and in general making things worse, however with 3.0 hitting the scene I'm willing to give it a second chance providing I have time :)
Sorry for the long reply but I didn't want you guys to kill yourself to fix something that NCSoft (West) is even too lazy to fix. However like I originally posted if it makes Wine better on the 64-bit end Kudos to you guys.
http://bugs.winehq.org/show_bug.cgi?id=27680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|64 bit Aion client crashes |64 bit Aion client crashes |on load |on load (violation of the | |Windows 64-bit ABI, stack | |pointer (RSP) must be | |16-byte aligned when making | |a call to Win64 API)
--- Comment #5 from Anastasius Focht focht@gmx.net 2012-04-02 16:31:40 CDT --- Hello,
Alexandre is right ...
On Windows this app probably gets away because there are no MMX/SSE instructions in native API code path which might cause alignment fault. The native API will most likely end very quickly in syscall without any additional validation/copying overhead.
I made some tests, manually fixing the API calls when required using per-API suppression of MMX/SSE instruction generation (__attribute__ ((__target__ ("no-mmx"))) __attribute__ ((__target__ ("no-sse")))) and for all called sub-functions -> debug trace) and it seems the app calls more Win64 API with misaligned stack pointer ... :|
Disabling generation of SIMD instructions won't help in some situations: any page fault due to invalid parameters will blow the thing up too because the x64 exception handling also depends on 16-byte alignment constraint.
My guess: the obfuscator messed their code up, causing the misalignment.
If Alexandre has no objections we can use this bug as collector for apps that violate the ABI for Windows x64 (misaligned stack pointer) but mark it WONTFIX?
Regards
http://bugs.winehq.org/show_bug.cgi?id=27680
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX
--- Comment #6 from Alexandre Julliard julliard@winehq.org 2012-04-03 03:40:19 CDT --- Yes, this can be a WONTFIX, unless we find a significant number of apps with the same problem.
http://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #7 from Acidphase Acidphase@gmail.com 2012-04-03 12:03:03 CDT --- Off topic but within the scheme of things I haven't tried the wow 64-bit client yet released in 4.3.3 details can be found here: http://eu.battle.net/wow/en/forum/topic/3312962371
I'm willing to be that Blizzard's implementation is better than NCSofts lol
When I get some time I will run a few tests in Gentoo, to be honest I haven't been gaming in Linux much lately due to the fact there isn't TRI-Fire support from AMD Catalyst Drivers yet which saddens me greatly being I have 5970+5870 cards.
http://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #8 from Jerome Leclanche adys.wh@gmail.com 2012-04-03 12:06:44 CDT --- (In reply to comment #7) The 64bit wow client works great. There are a couple bugs open about it but it's just as good as the regular one.
http://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #9 from Acidphase Acidphase@gmail.com 2012-04-03 16:08:28 CDT --- (In reply to comment #8)
(In reply to comment #7) The 64bit wow client works great. There are a couple bugs open about it but it's just as good as the regular one.
lol I had feeling that's for the confirmation. Telling you guys NCsoft just plain out suck with their code so many problems their more worried about money than quality it isn't by surprise they're going free to play.
http://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #10 from Anastasius Focht focht@gmx.net 2012-04-03 16:18:10 CDT --- Hello guys,
please leave that discussion out of this bug. Use the Wine forum for that. Thanks.
Regards
http://bugs.winehq.org/show_bug.cgi?id=27680
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Jerome Leclanche adys.wh@gmail.com 2012-04-06 11:58:04 CDT --- n
http://bugs.winehq.org/show_bug.cgi?id=27680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
--- Comment #12 from Anastasius Focht focht@gmx.net 2013-09-01 14:11:31 CDT --- *** Bug 34258 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=27680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pietro10@mac.com
--- Comment #13 from Anastasius Focht focht@gmx.net --- *** Bug 36695 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=27680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|64 bit Aion client crashes |Multiple 64-bit |on load (violation of the |applications crash on |Windows 64-bit ABI, stack |startup (violation of the |pointer (RSP) must be |Windows 64-bit ABI, stack |16-byte aligned when making |pointer (RSP) must be |a call to Win64 API) |16-byte aligned when making | |a call to Win64 API)
--- Comment #14 from Anastasius Focht focht@gmx.net --- Hello folks,
refining the summary to collect all violators ("Hall of Shame") here.
Regards
https://bugs.winehq.org/show_bug.cgi?id=27680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lipkegu@gmail.com
--- Comment #15 from Anastasius Focht focht@gmx.net --- *** Bug 37213 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=27680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ngupta@umiacs.umd.edu
--- Comment #16 from Anastasius Focht focht@gmx.net --- *** Bug 37719 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=27680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |thrasher2k2@gmail.com
--- Comment #17 from Anastasius Focht focht@gmx.net --- *** Bug 38810 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=27680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bucaneer@gmail.com
--- Comment #18 from Anastasius Focht focht@gmx.net --- *** Bug 38775 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #19 from Justas L bucaneer@gmail.com --- *** Bug 38775 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #20 from Justas L bucaneer@gmail.com --- (In reply to Alexandre Julliard from comment #6)
Yes, this can be a WONTFIX, unless we find a significant number of apps with the same problem.
So far there are 7 apps affected by this problem, and for at least one of them (Planetside 2) it is critical because there is no 32bit alternative to use as a workaround. I'd say that is a significant number. It should be up to Wine to reproduce Windows behaviour, where this issue is non-fatal.
https://bugs.winehq.org/show_bug.cgi?id=27680
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED Resolution|WONTFIX |---
--- Comment #21 from Austin English austinenglish@gmail.com --- (In reply to Justas L from comment #20)
(In reply to Alexandre Julliard from comment #6)
Yes, this can be a WONTFIX, unless we find a significant number of apps with the same problem.
So far there are 7 apps affected by this problem, and for at least one of them (Planetside 2) it is critical because there is no 32bit alternative to use as a workaround. I'd say that is a significant number. It should be up to Wine to reproduce Windows behaviour, where this issue is non-fatal.
Reopening.
https://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #22 from Anastasius Focht focht@gmx.net --- Hello folks,
--- quote --- So far there are 7 apps affected by this problem, and for at least one of them (Planetside 2) it is critical because there is no 32bit alternative to use as a workaround. I'd say that is a significant number. --- quote ---
I wouldn't call seven out of potentially thousands of 64-bit apps significant. Wine is pretty good at catching those offenders and I've tested/run a number of 64-bit apps without issues. There are 64-bit versions of major games that work out of the box (WoW for example).
The GO project (bug 36695) fixed their code because Wine caught the violation.
https://github.com/golang/go/commit/418b39d436ceda146bbbced0bd716bff2f8371e2
Others don't bother at all, they just ignore Linux and/or don't like Wine.
--- quote --- It should be up to Wine to reproduce Windows behaviour, where this issue is non-fatal. --- quote ---
It's technically and legally not possible to recreate exact binary code sequence of MS Windows API entries and potentially leaf functions, especially when it comes down to native API.
But alas, it's up to Alexandre to introduce the rather drastic (in my opinion) measure of realigning the stack on Win64. Those apps violate the Win64 ABI and "magically" fixing this might hide even more mess, making analysis harder.
Regards
https://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #23 from Alexandre Julliard julliard@winehq.org --- (In reply to Anastasius Focht from comment #22)
But alas, it's up to Alexandre to introduce the rather drastic (in my opinion) measure of realigning the stack on Win64. Those apps violate the Win64 ABI and "magically" fixing this might hide even more mess, making analysis harder.
I wouldn't mind too much enabling force_align_arg_pointer, but AFAICT gcc doesn't support this on x86_64.
https://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #24 from Justas L bucaneer@gmail.com --- As I understand it, the crashing function(s) already get the force_align_arg_pointer attribute from the WINAPI define. On top of that, at least some distro packages (e.g. in Arch Linux, that I use) have Wine compiled with -mstackrealign. Neither option affects the crashes.
https://bugs.winehq.org/show_bug.cgi?id=27680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |NEW
--- Comment #25 from Anastasius Focht focht@gmx.net --- Hello Justas
it's as Alexandre said: GCC doesn't implement 'force_align_arg_pointer' attribute and '-mstackrealign' for x86_64 target = they have no effect there.
https://github.com/gcc-mirror/gcc/search?&q=mstackrealign&utf8
You could try to make a plea for this "feature" in GCC project through.
Regards
https://bugs.winehq.org/show_bug.cgi?id=27680
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=66697
--- Comment #26 from Austin English austinenglish@gmail.com --- Upstream GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66697
https://bugs.winehq.org/show_bug.cgi?id=27680
K1773R K1773R@darkgamex.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |K1773R@darkgamex.ch
https://bugs.winehq.org/show_bug.cgi?id=27680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mrsmiley32@gmail.com
--- Comment #27 from Anastasius Focht focht@gmx.net --- *** Bug 39267 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=27680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hairy.one@virgin.net
--- Comment #28 from Anastasius Focht focht@gmx.net --- *** Bug 39292 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #29 from Austin English austinenglish@gmail.com --- (In reply to Austin English from comment #26)
Upstream GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66697
There's a patch available at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66697#c6
I won't be able to test for a couple weeks, so hopefully someone will beat me to it ;)
https://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #30 from Justas L bucaneer@gmail.com --- The gcc patch does (mostly) work - see my comment at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66697#c8
-mincoming-stack-boundary=3 allows Planetside 2 to launch and run, definitively resolving bug 38775. However, curiously, -mstackrealign or compiling without extra options and trusting force_align_arg_pointer still lead to the same crash.
I also tested the program from bug 37719 (because it seems to be the smallest/simplest among the listed duplicates), and it still crashes even with -mincoming-stack-boundary=3. Perhaps there's a different or additional bug in that case?
https://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #31 from Justas L bucaneer@gmail.com --- Correction: using the updated version of gcc patch ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66697#c11 ) and compiling Wine with -mincoming-stack-boundary=3 fixes bug 38775 (Planetside 2), bug 37719 (BatToExe) and bug 39267 (Unity), while the testcase URL provided in this report fails with a different crash report (I guess that's to be expected for a very outdated MMO client). Didn't test others but I suppose this counts as a fix.
https://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #32 from Justas L bucaneer@gmail.com --- Another correction: I was mistakenly assuming that the WINAPI define always included force_align_arg_pointer attribute, whereas it was only true for the 32bit target. Adding force_align_arg_pointer on 64bit as well fixes the bug (the 4 testcases mentioned before) without the use of -mincoming-stack-boundary=3.
https://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #33 from Justas L bucaneer@gmail.com --- Created attachment 52511 --> https://bugs.winehq.org/attachment.cgi?id=52511 use force_align_arg_pointer in WINAPI on x86_64
This patch fixes the bug in conjunction with patched gcc. With unpatched gcc, it does nothing (because force_align_arg_pointer is not rejected, but merely non-functional on x86_64 prior to the patch).
https://bugs.winehq.org/show_bug.cgi?id=27680
Marcus Meissner marcus@jet.franken.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |marcus@jet.franken.de
https://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #34 from Justas L bucaneer@gmail.com --- GCC 5.3 with 64bit stack alignment has been out for a while. However, there was also a bug that prevented using forced alignment together with optimizations (-O1 or higher) and -fstack-check:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69140
It has been fixed, but I think it will be months before there's another stable release. Meanwhile, there's a workaround: using -fno-omit-frame-pointer (or alternatively, not using either optimizations or -fstack-check).
Question: is it alright to submit the Wine patch when it is known it might require compile-time workarounds?
https://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #35 from Austin English austinenglish@gmail.com --- (In reply to Justas L from comment #34)
GCC 5.3 with 64bit stack alignment has been out for a while. However, there was also a bug that prevented using forced alignment together with optimizations (-O1 or higher) and -fstack-check:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69140
It has been fixed, but I think it will be months before there's another stable release. Meanwhile, there's a workaround: using -fno-omit-frame-pointer (or alternatively, not using either optimizations or -fstack-check).
Question: is it alright to submit the Wine patch when it is known it might require compile-time workarounds?
Sure, but please specify them when submitting so that anyone testing can do so properly.
https://bugs.winehq.org/show_bug.cgi?id=27680
Saulius K. saulius2@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |saulius2@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #36 from Justas Lavišius bucaneer@gmail.com --- Not sure why it was not listed in the release notes, but this bug is fixed in 1.9.3, as of commit https://source.winehq.org/git/wine.git/commit/dccb57dfd9c668eff5e672def93405...
https://bugs.winehq.org/show_bug.cgi?id=27680
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |dccb57dfd9c668eff5e672def93 | |405be8a3303bd Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #37 from Austin English austinenglish@gmail.com --- (In reply to Justas Lavišius from comment #36)
Not sure why it was not listed in the release notes, but this bug is fixed in 1.9.3, as of commit https://source.winehq.org/git/wine.git/commit/ dccb57dfd9c668eff5e672def93405be8a3303bd
Fixed.
https://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #38 from Nikolay Sivov bunglehead@gmail.com --- What about compilers other than GCC?
https://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #39 from Austin English austinenglish@gmail.com --- (In reply to Nikolay Sivov from comment #38)
What about compilers other than GCC?
A new bug should probably be filed for that case.
https://bugs.winehq.org/show_bug.cgi?id=27680
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mstefani@redhat.com Target Milestone|--- |1.8.x
https://bugs.winehq.org/show_bug.cgi?id=27680
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #40 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.4.
https://bugs.winehq.org/show_bug.cgi?id=27680
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.8.x |---
--- Comment #41 from Michael Stefaniuc mstefani@redhat.com --- Removing 1.8.x milestone from bugs included in 1.8.3.
https://bugs.winehq.org/show_bug.cgi?id=27680
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.8.x
--- Comment #42 from Michael Stefaniuc mstefani@redhat.com --- This bug was not included in wine-1.8.3 as I had queued / deferred it for a later stable release. Due to a mistake on my part I forgot to remove it from the release notes and the Target Milestone was cleared after the release.
https://bugs.winehq.org/show_bug.cgi?id=27680
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.8.x |---
--- Comment #43 from Michael Stefaniuc mstefani@redhat.com --- Removing 1.8.x milestone from bugs included in 1.8.4.
https://bugs.winehq.org/show_bug.cgi?id=27680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.moosbauer95@web.de
--- Comment #44 from Anastasius Focht focht@gmx.net --- *** Bug 39989 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=27680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tahoar@gmail.com
--- Comment #45 from Anastasius Focht focht@gmx.net --- *** Bug 31742 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=27680
--- Comment #46 from Anastasius Focht focht@gmx.net --- *** Bug 34236 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=27680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wemember@live.co.uk
--- Comment #47 from Anastasius Focht focht@gmx.net --- *** Bug 37389 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=27680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |normal URL|http://dl.dropbox.com/u/461 |https://web.archive.org/web |37118/Aion-2.7-GameForge-20 |/20130806095815/http://cygw |-01-2012.zip |in.com/setup-x86_64.exe
--- Comment #48 from Anastasius Focht focht@gmx.net --- Hello folks,
replacing broken download link with a smaller one from bug 34258 ("64-bit Cygwin installer crashes on start (app misaligns stack causing crash in gcc emitted x64 MSABI prologue code)") for documentation / reproducing.
https://web.archive.org/web/20130806095815/http://cygwin.com/setup-x86_64.ex...
$ sha1sum setup-x86_64.exe bfc1361c5c1b178a355112602efd5f50b009eb64 setup-x86_64.exe
$ du -sh setup-x86_64.exe 948K setup-x86_64.exe
---
Note about my recent addition of dupes:
All 64-bit Java SE 6 update 21..34 releases are broken as well. The workaround of using JVM interpreted mode ('-Xint' parameter) just takes a different code path, avoiding the broken code.
I will keep two custom Wine builds to quickly test for broken 64-bit apps if I can still find some of those.
Wine build before the workaround for broken win64 apps:
$ wine --version wine-1.9.2-133-g71f018cba51
Wine build with workaround for broken win64 apps:
$ wine --version wine-1.9.2-134-gdccb57dfd9c
Regards