http://bugs.winehq.org/show_bug.cgi?id=24287
Summary: stl_test crashes Product: Wine Version: 1.3.2 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: msvcp AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
I thought it'd be fun to try an STL test suite on Wine, so I did: sh winetricks vc2005express cd ~/.wine/drive_c wget http://petef.22web.net/cpp/stltest-1.00.tar.gz tar -xzvf stltest-1.00.tar.gz chmod +w -R stltest cd stltest wget http://kegel.com/wine/stltest.patch patch -p1 < stltest.patch cd ~/"drive_c/Program Files/Microsoft Visual Studio 8/Common7/Tools" wine cmd and then, in cmd, vsvars32 cd \stltest nmake vc.mak
I then copied the resulting stl_test.exe{,.manifest} to a fresh wineprefix, unsullied by installing Visual C++ or its runtimes, and ran it. Crashed on the very first test case as follows (according to +relay,+seh):
0009:Call msvcp90.?length@?$char_traits@D@std@@SAIPBD@Z(0046170c) ret=0040966d 0009:Call ntdll.strlen(0046170c "Results of accum1_test:") ret=7ed1b92c 0009:Ret ntdll.strlen() retval=00000017 ret=7ed1b92c 0009:Ret msvcp90.?length@?$char_traits@D@std@@SAIPBD@Z() retval=00000017 ret=0040966d trace:seh:raise_exception code=c0000005 flags=0 addr=0x40967b ip=0040967b tid=0009 ... wine: Unhandled page fault on read access to 0x90909094 at address 0x40967b (thread 0009), starting debugger...
'winetricks vcrun2005' works around this, and the executable produces the same results as on Vista then.
Annoyingly, regardless of /Zi or /Z7, I didn't get a good stack dump out of winedbg :-(
http://bugs.winehq.org/show_bug.cgi?id=24287
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source
http://bugs.winehq.org/show_bug.cgi?id=24287
--- Comment #1 from Dan Kegel dank@kegel.com 2010-09-06 08:46:44 CDT --- Created an attachment (id=30603) --> (http://bugs.winehq.org/attachment.cgi?id=30603) List of the 64 functions this test imports from msvcr80
Of the 64 functions this test imports from msvcp80, only 14 are implemented so far: ?0?$allocator@D@std@@QAE@ABV01@@Z ?0?$allocator@D@std@@QAE@XZ ?0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z ?0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z ?0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ ?1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ allocate@?$allocator@D@std@@QAEPADI@Z c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ construct@?$allocator@D@std@@QAEXPADABD@Z deallocate@?$allocator@D@std@@QAEXPADI@Z eof@?$char_traits@D@std@@SAHXZ eq_int_type@?$char_traits@D@std@@SA_NABH0@Z length@?$char_traits@D@std@@SAIPBD@Z max_size@?$allocator@D@std@@QBEIXZ
The other 50 are still stubs. At the moment, one would expect the test to fail when it ran into a stub, but it seems to crash before it hits one of those. Let's not worry about the stubs for the moment, and make this bug just about the ones already implemented. We can open other bug(s) for the stubs later.
http://bugs.winehq.org/show_bug.cgi?id=24287
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|stl_test crashes |stl_test crashes in first | |test case, in cout << | |"Results"
--- Comment #2 from Dan Kegel dank@kegel.com 2010-09-06 10:23:59 CDT --- I rebuilt everything with /Z7, and copied stl_test.* to the pristine wineprefix, and now I do get a symbolic stack dump.
To build just the one test case, do cl /MD /EHsc /Z7 /DMAIN accum1.cpp
Running that in wine fails with Backtrace: =>0 0x00401cfb std::operator<<<std::char_traits<char> >+0x4b(_Ostr=0x7ee6bf20, _Val="Results of accum1_test:") [c:\program files\microsoft visual studio 8\vc\include\ostream:744] in accum1 (0x0032fe08) 1 0x004012bd main+0x3c(__formal=0x7ee6bf20, __formal=0x40664c) [c:\stltest\accum1.cpp:15] in accum1 (0x0032fe5c)
Line 744 of ostream is streamsize _Pad = _Ostr.width() <= 0 || _Ostr.width() <= _Count ? 0 : _Ostr.width() - _Count;
http://bugs.winehq.org/show_bug.cgi?id=24287
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |piotr.caban@gmail.com
--- Comment #3 from Piotr Caban piotr.caban@gmail.com 2010-09-06 16:42:51 CDT --- I've checked why the application is crashing. It's because cout is not implemented (you can change all cout's to printf and then some tests will be probably working).
The program is crashing because cout class (global structure) is not exported (and it's trying to read from it). In order to get past this crash ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A have to be implemented (it turns out there's no nice error message in data is not exported by dll).
http://bugs.winehq.org/show_bug.cgi?id=24287
--- Comment #4 from Dan Kegel dank@kegel.com 2010-10-16 14:39:52 CDT --- Hmm, current wine can't even run nmake, it just exits silently. Grumble regression grumble
http://bugs.winehq.org/show_bug.cgi?id=24287
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Summary|stl_test crashes in first |stl_test crashes due to |test case, in cout << |missing |"Results" |msvcp90.dll.?cout@std@@3V?$ | |basic_ostream@DU?$char_trai | |ts@D@std@@@1@A
--- Comment #5 from Anastasius Focht focht@gmx.net 2011-06-22 04:59:55 CDT --- Hello,
refining summary to better target "cout" export. "cerr" is tracked by bug 26025
Regards
http://bugs.winehq.org/show_bug.cgi?id=24287
--- Comment #6 from Piotr Caban piotr.caban@gmail.com 2012-06-25 12:38:16 CDT --- cout is now exported in msvcp90. Please retest.
http://bugs.winehq.org/show_bug.cgi?id=24287
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #7 from Dan Kegel dank@kegel.com 2012-06-25 14:32:01 CDT --- That file is now only online at http://web.archive.org/web/20060202000105/http://petef.port5.com/cpp/stltest... sha1sum 8cf192cae489f12a4c70e4f70904830ea25e2dcf
and it gets past the cout crash now, thanks.
Next is bug 31019.
http://bugs.winehq.org/show_bug.cgi?id=24287
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org 2012-07-03 14:14:58 CDT --- Closing bugs fixed in 1.5.8.
http://bugs.winehq.org/show_bug.cgi?id=24287
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |b9fbe6d5e686508130811df6bcb | |ba15db54e73e4 URL| |http://web.archive.org/web/ | |20060202000105/http://petef | |.port5.com/cpp/stltest-1.00 | |.tar.gz