http://bugs.winehq.org/show_bug.cgi?id=29099
Bug #: 29099 Summary: LabView demo: crashes on start Product: Wine Version: 1.3.32 Platform: x86 URL: http://ftp.ni.com/evaluation/labview/ekit/other/downlo ader/2011LV-WinEng_downloader.exe OS/Version: Linux Status: NEW Keywords: download Severity: normal Priority: P2 Component: shlwapi AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com Depends on: 29098 Classification: Unclassified
Created attachment 37502 --> http://bugs.winehq.org/attachment.cgi?id=37502 backtrace
Install the demo (silverlight install fails, and I declined installing drivers). After that, try to start, crashes: Backtrace: =>0 0xb761741d memmove+0x4d() in libc.so.6 (0x0033f8e4) 1 0x7eab6276 PathStripPathA+0x55(lpszPath="LabVIEW") [/home/austin/wine-git/dlls/shlwapi/path.c:649] in shlwapi (0x0033f8e4) 2 0x006a6ca2 in labview (+0x2a6ca1) (0x0033fb2c) 3 0x006a8283 in labview (+0x2a8282) (0x0033fddc) 4 0x78542201 in msvcr90 (+0x22200) (0x0033fde8) 5 0x01ca2f62 in labview (+0x18a2f61) (0x0033fe70) 6 0x7b85a98c call_process_entry+0xb() in kernel32 (0x0033fe88) 7 0x7b85b98f start_process+0x5e(peb=0x7ffdf000) [/home/austin/wine-git/dlls/kernel32/process.c:1090] in kernel32 (0x0033fec8) 8 0x7bc734f0 call_thread_func_wrapper+0xb() in ntdll (0x0033fed8) 9 0x7bc75f2d call_thread_func+0x7c(entry=0x7b85b930, arg=0x7ffdf000, frame=0x33ffc8) [/home/austin/wine-git/dlls/ntdll/signal_i386.c:2532] in ntdll (0x0033ffa8) 10 0x7bc734ce call_thread_entry_point+0x11() in ntdll (0x0033ffc8) 11 0x7bc4c43e start_process+0x1d(kernel_start=0x7b85b930) [/home/austin/wine-git/dlls/ntdll/loader.c:2612] in ntdll (0x0033ffe8) 12 0xb7726acd wine_call_on_stack+0x1c() in libwine.so.1 (0x00000000) 0xb761741d memmove+0x4d in libc.so.6: repe movsl (%esi),%es:(%edi)
http://bugs.winehq.org/show_bug.cgi?id=29099
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://ftp.ni.com/evaluatio |http://download.ni.com/eval |n/labview/ekit/other/downlo |uation/labview/ekit/other/d |ader/2011LV-WinEng_download |ownloader/2011LV-WinEng.exe |er.exe |
--- Comment #1 from Austin English austinenglish@gmail.com 2011-11-15 23:46:52 CST --- Changing url to direct link.
http://bugs.winehq.org/show_bug.cgi?id=29099
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Summary|LabView demo: crashes on |LabView 2011 demo crashes |start |on start | |(PathRemoveExtensionA/W | |unconditionally tries to | |null terminate string)
--- Comment #2 from Anastasius Focht focht@gmx.net 2011-12-30 10:22:28 CST --- Hello,
confirming, still present.
--- snip --- ... 00c2:Call shlwapi.PathRemoveExtensionA(01e7a740 "LabVIEW") ret=006a6cad 00c2:Call user32.CharNextA(01e7a740 "LabVIEW") ret=686ad97a 00c2:Ret user32.CharNextA() retval=01e7a741 ret=686ad97a 00c2:Call user32.CharNextA(01e7a741 "abVIEW") ret=686ad97a 00c2:Ret user32.CharNextA() retval=01e7a742 ret=686ad97a 00c2:Call user32.CharNextA(01e7a742 "bVIEW") ret=686ad97a 00c2:Ret user32.CharNextA() retval=01e7a743 ret=686ad97a 00c2:Call user32.CharNextA(01e7a743 "VIEW") ret=686ad97a 00c2:Ret user32.CharNextA() retval=01e7a744 ret=686ad97a 00c2:Call user32.CharNextA(01e7a744 "IEW") ret=686ad97a 00c2:Ret user32.CharNextA() retval=01e7a745 ret=686ad97a 00c2:Call user32.CharNextA(01e7a745 "EW") ret=686ad97a 00c2:Ret user32.CharNextA() retval=01e7a746 ret=686ad97a 00c2:Call user32.CharNextA(01e7a746 "W") ret=686ad97a 00c2:Ret user32.CharNextA() retval=01e7a747 ret=686ad97a 00c2:trace:seh:raise_exception code=c0000005 flags=0 addr=0x686ae4b8 ip=686ae4b8 tid=00c2 00c2:trace:seh:raise_exception info[0]=00000001 00c2:trace:seh:raise_exception info[1]=01e7a747 00c2:trace:seh:raise_exception eax=01e7a747 ebx=686e962c ecx=00000000 edx=00000057 esi=0032f8c0 edi=0032f844 00c2:trace:seh:raise_exception ebp=0032f838 esp=0032f800 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010206 00c2:trace:seh:call_vectored_handlers calling handler at 0x68f86e0e code=c0000005 flags=0 00c2:trace:seh:call_vectored_handlers handler at 0x68f86e0e returned 0 --- snip ---
shlwapi.dll PathRemoveExtensionA() tries to modify a string that is located in read-only executable section.
Dump of section info/executable mappings at runtime:
--- snip --- Address Size Contains Access .... 00400000 0000100 PE header R 00401000 01A7400 .text Code R E 01E75000 0053B00 .rdata Imports,exports R 023B0000 0016B00 .data Data RWE CopyOnWr 0251B000 003C700 .rsrc Resources R --- snip ---
0x01e7a740 "LabVIEW"-> constant string literal in .rdata
--- snip --- Address Value ASCII 01E7A740 5662614C LabV 01E7A744 00574549 IEW 01E7A748 67655210 Reg 01E7A74C 72747369 istr --- snip ---
Code: http://source.winehq.org/git/wine.git/blob/ce3dd89b5411edfdf448bd80ac8dd2b71...
--- snip --- 766 void WINAPI PathRemoveExtensionA(LPSTR lpszPath) 767 { 768 TRACE("(%s)\n", debugstr_a(lpszPath)); 769 770 if (lpszPath) 771 { 772 lpszPath = PathFindExtensionA(lpszPath); 773 *lpszPath = '\0'; 774 } 775 } --- snip ---
Obviously PathRemoveExtensionA() isn't supposed to modify the string in this case (writing null terminator). I added a null terminator check and it allows the application to start.
You might also want to fix PathRemoveExtensionW().
$ sha1sum 2011LV-WinEng.exe 2827f32f1ce737226f34a0961938ed84b8f0e164 2011LV-WinEng.exe
$ wine --version wine-1.3.35-273-geaa8801
Regards
http://bugs.winehq.org/show_bug.cgi?id=29099
Luca Bennati lucak3@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lucak3@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=29099
Carlo Bramini carlo.bramix@libero.it changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |carlo.bramix@libero.it
--- Comment #3 from Carlo Bramini carlo.bramix@libero.it 2012-04-09 17:03:06 CDT --- I tried to do some debugging on this bug and I discovered that PathRemoveExtension() crashes on Windows too if a constant string like "labview.txt"is given as parameter, but it does not if the parameter is just "labview": still constant but without dot and extension.
The implementation of PathRemoveExtensionA/W in the source of WINE is using PathFindExtensionA/W for finding the extension to be removed; according to MSDN:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb773587%28v=vs.85%2...
"Returns the address of the "." that precedes the extension within pszPath if an extension is found, or the address of the terminating null character otherwise."
So, the only logical explanation I can think on this behavior is that the function does not write the NUL character if it is already existing at the given position. This condition makes lucky working the function, but the reason why LabView is feeding a constant string is a bit unknown to me...
I have posted a patch here about this bug:
http://source.winehq.org/patches/data/85297
Sincerely,
Carlo Bramini.
http://bugs.winehq.org/show_bug.cgi?id=29099
--- Comment #4 from Carlo Bramini carlo.bramix@libero.it 2012-04-14 04:50:03 CDT --- The above patch has been committed in WINE-1.5.2 Is it possible to retest this issue, please?
http://bugs.winehq.org/show_bug.cgi?id=29099
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |f9c9ea6343daf1fbd587d4718b4 | |8371ad1bef5a3 Status|NEW |RESOLVED Depends on| |29957 Resolution| |FIXED
--- Comment #5 from Anastasius Focht focht@gmx.net 2012-04-14 06:23:43 CDT --- Hello Carlo,
yes it's fixed by commit http://source.winehq.org/git/wine.git/commitdiff/f9c9ea6343daf1fbd587d4718b4...
Thanks
Prerequisite: 'winetricks -q dotnet20'
The Silverlight 4.x installer problem is bug 29957
$ du -sh 2011LV-WinEng.exe 920M 2011LV-WinEng.exe
$ sha1sum 2011LV-WinEng.exe 2827f32f1ce737226f34a0961938ed84b8f0e164 2011LV-WinEng.exe
$ wine --version wine-1.5.2
Regards
http://bugs.winehq.org/show_bug.cgi?id=29099
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org 2012-04-27 12:59:26 CDT --- Closing bugs fixed in 1.5.3.
http://bugs.winehq.org/show_bug.cgi?id=29099
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.4.x
http://bugs.winehq.org/show_bug.cgi?id=29099
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.4.x |---
http://bugs.winehq.org/show_bug.cgi?id=29099
Bug 29099 depends on bug 29957, which changed state.
Bug 29957 Summary: Silverlight 4 does not install (Microsoft PlayReady DRM scheme requires FILE_PERSISTENT_ACLS if returned filesystem type is NTFS) http://bugs.winehq.org/show_bug.cgi?id=29957
What |Old Value |New Value ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
https://bugs.winehq.org/show_bug.cgi?id=29099
Bug 29099 depends on bug 29098, which changed state.
Bug 29098 Summary: LabVIEW 2010 demo downloader: switching virtual desktop causes the window to disappear https://bugs.winehq.org/show_bug.cgi?id=29098
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED