https://bugs.winehq.org/show_bug.cgi?id=43666
Bug ID: 43666 Summary: PuTTY crashes if compiled with 64-bit winegcc (winegcc defines va_list incorrectly for Win64) Product: Wine Version: 2.16 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: tools Assignee: wine-bugs@winehq.org Reporter: alexhenrie24@gmail.com Distribution: ---
Created attachment 59112 --> https://bugs.winehq.org/attachment.cgi?id=59112 backtrace
To reproduce this bug:
1. Clone PuTTY from https://git.tartarus.org/simon/putty.git
2. Run `./mkfiles.pl`
3. Run `make -C windows -f Makefile.mgw CC="winegcc -mno-cygwin" COMPAT="-D__MINGW32__" RC=wrc`
4. Run `wine windows/putty.exe.so`
A backtrace is attached, but to save you some time, PuTTY is crashing in its dupvprintf_inner function:
va_list aq; va_copy(aq, ap); len = vsnprintf(buf + oldlen, size, fmt, aq); va_end(aq);
The problem is that va_list has one ABI on 32-bit Windows or Linux binaries and another on 64-bit Windows binaries. I can work around the problem by adding -m32 or -mabi=ms to the winegcc options. One solution might be to make winegcc use -mabi=ms by default.
https://bugs.winehq.org/show_bug.cgi?id=43666
Alex Henrie alexhenrie24@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Hardware|x86 |x86-64 Keywords| |source, win64
https://bugs.winehq.org/show_bug.cgi?id=43666
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de
https://bugs.winehq.org/show_bug.cgi?id=43666
--- Comment #1 from Alex Henrie alexhenrie24@gmail.com --- There is a related GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50818