[Bug 25273] New: svcrt/misc.ok I10_OUTPUT long double crash with winetest.exe, not make test
http://bugs.winehq.org/show_bug.cgi?id=25273 Summary: svcrt/misc.ok I10_OUTPUT long double crash with winetest.exe, not make test Product: Wine Version: 1.3.7 Platform: x86 OS/Version: Mac OS X 10.5 Status: UNCONFIRMED Severity: normal Priority: P2 Component: msvcrt AssignedTo: wine-bugs(a)winehq.org ReportedBy: hoehle(a)users.sourceforge.net msvcrt/misc.ok crashes with winetest.exe (or the msvcrt_test.exe therein), but not with make test. It seems that the format of "long double" does not match what's expected. A trace with make test yields a correct trace: msvcrt:MSVCRT_I10_OUTPUT (0.000000 10 0 0x32fd14) winetest.exe leads instead to: msvcrt:MSVCRT_I10_OUTPUT (0.000000 0 64fd20 0x64) Unhandled exception: page fault on write access to 0x00000066 in 32-bit code (0x4034add6). 0x4034add6 _MSVCRT_I10_OUTPUT+0x66 in msvcrt: movb $0x20,0x2(%edi) This could be: - a bug in gcc on MacOS X 10.5.8 i686-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5566) What do other Mac users experience? - MacOS'gcc "long double" format not matching the MS one (or another parameter passing convention)? - MSVCRT__LDOUBLE not defined correctly on MacOS? long double parameters might behave differently than struct { long double; } (test/misc.c test calls long double, while msvcrt/string.c operates on struct?) - the .spec file unable to deal with the format @ cdecl -norelay $I10_OUTPUT(double long long long ptr) MSVCRT_I10_OUTPUT is not distinguishable from a (double, int, int, void*) function. - ...? It seems that msvcrt/misc/I10_OUTPUT_test is solely affected because it's the only test involving the long double format. BTW, line #9, which tests 0.0, 10, 1 logs msvcrt:MSVCRT_I10_OUTPUT (0.000000 1 64fd20 0x64) I.e. the third parameter appears in second position. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=25273 Jörg Höhle <hoehle(a)users.sourceforge.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|svcrt/misc.ok I10_OUTPUT |msvcrt/misc.ok I10_OUTPUT |long double crash with |long double crash with |winetest.exe, not make test |winetest.exe, not make test -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=25273 --- Comment #1 from Jörg Höhle <hoehle(a)users.sourceforge.net> 2010-11-23 17:50:37 CST --- http://gcc.gnu.org/ml/gcc-bugs/2000-08/msg00385.html http://gcc.gnu.org/ml/gcc/1998-10/msg00176.html mention sizeof(long double) on Linux/IRIX/Sparc being either 12/8/16 It's 16 on MacOS X 10.5.8 with the mentioned gcc. The traced lines can well be explained by finding 4 bytes less on the stack than expected (12 .exe instead of 16 .exe.so). -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=25273 --- Comment #2 from Jörg Höhle <hoehle(a)users.sourceforge.net> 2010-11-30 07:05:18 CST --- http://gcc.gnu.org/ml/gcc-help/2006-10/msg00138.html explains that although sizeof() may be 16 or 12, the actual payload is 10 Bytes! (80 bit float format). Surprisingly, FreeBSD machines pass the msvcrt/misc test. They should not, according to the above message (*BSD equating double with long double) -- perhaps sizeof(long double) is 12 even though only 64 bits are used on FreeBSD? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=25273 --- Comment #3 from Jörg Höhle <hoehle(a)users.sourceforge.net> 2010-12-01 15:45:51 CST --- Created an attachment (id=32287) --> (http://bugs.winehq.org/attachment.cgi?id=32287) patch to dlls/msvrt/string.c but not to tests/misc.c UNIX long double != MS long double even when they all use Intel's 80 bit FP format. Their sizeof() may diffe.r Here's a fix to dlls/msvcrt that decouples use of long double on the host OS from what MS expects. winetest.exe passes the msvcrt/misc test, proving that stack usage when passing parameters is correct. Alas, I've not figured out how to do the same with the test code in msvcrt/tests/misc.c: It must not declare *pI10_OUTPUT using long double as that is wrong on every UNIX system where sizeof(long double) != 12. Yet the test code still wants to make use of some floating point literals. I.e., msvcrt/tests/misc.c is bogus and still needs a patch. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=25273 --- Comment #4 from Jörg Höhle <hoehle(a)users.sourceforge.net> 2011-02-17 10:37:36 CST --- patches sent to wine-patches http://www.winehq.org/pipermail/wine-patches/2011-February/098922.html fixes msvcrt.dll such that the native wintest.exe passes the tests on MacOS (which expectedly causes make check to crash on MacOS, since the msvcrt/test is based on the broken assumption that long double formats match on both sides). http://www.winehq.org/pipermail/wine-patches/2011-February/098923.html fixes the tests such that make test passes on MacOS as well as wintest.exe. but produced no feedback. Should I join them such that make test never fails? I believe some form of git apply foo.patch -- dlls/msvcrt/... could still be used to apply one part selectively. BTW, I'm using Mac OS X 5.8 (32 bit). -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=25273 Jörg Höhle <hoehle(a)users.sourceforge.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED --- Comment #5 from Jörg Höhle <hoehle(a)users.sourceforge.net> 2011-02-20 10:39:10 CST --- fixed by commit c6d67fad8f6d0ac199d0945314564e39aa64644f (msvcrt) and commit d9d43231371171ba128d391cfb37cc167e7651cc (the tests) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=25273 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Alexandre Julliard <julliard(a)winehq.org> 2011-03-04 12:35:18 CST --- Closing bugs fixed in 1.3.15. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=25273 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.2.x -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=25273 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.2.x |--- -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=25273 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- OS/Version|Mac OS X 10.5 |Mac OS X -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
participants (1)
-
wine-bugs@winehq.org