[Bug 41119] New: vbscript fails to parse 'createobject("wscript.shell") .run' statement
https://bugs.winehq.org/show_bug.cgi?id=41119 Bug ID: 41119 Summary: vbscript fails to parse 'createobject("wscript.shell").run' statement Product: Wine Version: 1.9.16 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: vbscript Assignee: wine-bugs(a)winehq.org Reporter: aihujianfei(a)qq.com Distribution: --- The vbscript file for test is : createobject("wscript.shell").run "calc.exe" I see the vbs bison parse file in https://github.com/alexhenrie/wine/blob/master/dlls/vbscript/parser.y , the parse failed at the pos [.run] in this file. I think the fail reason is there has one confilct . for more information , I run command [bison -v -d -pparser_ parser.y], then it generate file parser.output . In the file parser.output , part of the file show this confilct which mentioned above . " state 160 77 ArgumentList: Expression . 78 | Expression . ',' ArgumentList 85 Expression: Expression . tIMP EqvExpression 138 PrimaryExpression: '(' Expression . ')' tIMP shift, and go to state 123 ',' shift, and go to state 162 ')' shift, and go to state 156 ')' [reduce using rule 77 (ArgumentList)] " As we can see above , there has one shift/reduce conflict . to parse this file success , we need a reduce to ArgumentList , instead of shift to PrimaryExpression . I will appreciate your fix. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=41119 hujianfei <aihujianfei(a)qq.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jacek(a)codeweavers.com -- 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.
https://bugs.winehq.org/show_bug.cgi?id=41119 --- Comment #1 from Nikolay Sivov <bunglehead(a)gmail.com> --- This syntax does not work for me on Windows either, changing it to: .Run( "calc.exe" ) works on Windows, but not on Wine (but shell object is actually created and Run method is called). -- 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.
https://bugs.winehq.org/show_bug.cgi?id=41119 --- Comment #2 from hujianfei <aihujianfei(a)qq.com> --- Test file : createobject("wscript.shell").run ("calc.exe") My environment is : Windows 7 Service Pack 1 X64 Result: the script can run, and called calc.exe success. different with your result. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=41119 --- Comment #3 from Nikolay Sivov <bunglehead(a)gmail.com> --- That's exactly what I said in comment 1. And it's a different script from your original description. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=41119 --- Comment #4 from Bruno Jesus <00cpxxx(a)gmail.com> --- I pasted the lines below in a .vbs file in XP and run it and 2 notepads opened: createobject("wscript.shell").run "notepad.exe" createobject("wscript.shell").run ("notepad.exe") I did the same in wine and it also worked. AFAIR wine does not have a calc.exe, at least not in programs folder. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=41119 --- Comment #5 from Bruno Jesus <00cpxxx(a)gmail.com> --- Oops, my previous comment was at a tainted prefix, sorry. fixme:exec:SHELL_execute flags ignored: 0x00000100 wine(a)Note:/tmp/A/drive_c$ fixme:vbscript:VBScript_SetScriptState unimplemented SCRIPTSTATE_INITIALIZED fixme:vbscript:parse_script parser failed around L"\").run \"notepad.exe\"\ncreateobject(\"wscript.shell\").run (\"notepad.exe\")\n" fixme:wscript:run_script ParseScriptText failed: 80004005 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=41119 --- Comment #6 from hujianfei <aihujianfei(a)qq.com> --- (In reply to Nikolay Sivov from comment #3)
That's exactly what I said in comment 1. And it's a different script from your original description.
sorry , writing error . The test file is : createobject("wscript.shell").run "calc.exe" -- 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.
https://bugs.winehq.org/show_bug.cgi?id=41119 --- Comment #7 from hujianfei <aihujianfei(a)qq.com> --- (In reply to Bruno Jesus from comment #5)
Oops, my previous comment was at a tainted prefix, sorry.
fixme:exec:SHELL_execute flags ignored: 0x00000100 wine(a)Note:/tmp/A/drive_c$ fixme:vbscript:VBScript_SetScriptState unimplemented SCRIPTSTATE_INITIALIZED fixme:vbscript:parse_script parser failed around L"\").run \"notepad.exe\"\ncreateobject(\"wscript.shell\").run (\"notepad.exe\")\n" fixme:wscript:run_script ParseScriptText failed: 80004005
yes, parse failed , same with my case. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=41119 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 CC| |focht(a)gmx.net --- Comment #8 from Anastasius Focht <focht(a)gmx.net> --- Hello folks, confirming, still present. --- snip --- $ WINEDEBUG=+tid,+seh,+vbscript,+vbscript_disas wine cscript test.vbs ... 007e:trace:vbscript:VBScriptParse_InitNew (0x12d688) 007e:trace:vbscript:VBScript_AddNamedItem (0x12d688)->(L"WScript" 2) 007e:trace:vbscript:VBScript_AddNamedItem (0x12d688)->(L"WSH" 2) 007e:trace:vbscript:VBScript_SetScriptState (0x12d688)->(5) 007e:fixme:vbscript:VBScript_SetScriptState unimplemented SCRIPTSTATE_INITIALIZED 007e:trace:vbscript:VBScriptParse_ParseScriptText (0x12d688)->(L"createobject(\"wscript.shell\").run (\"notepad.exe\")\n" (null) (nil) (null) 1 1 82 (nil) (nil)) 007e:trace:vbscript_disas:dump_code 1: string L"notepad.exe" 007e:trace:vbscript_disas:dump_code 2: string L"wscript.shell" 007e:trace:vbscript_disas:dump_code 3: mcall L"run" 1 007e:trace:vbscript_disas:dump_code 4: icallv L"createobject" 1 007e:trace:vbscript_disas:dump_code 5: catch 5 0 007e:trace:vbscript_disas:dump_code 6: ret 007e:trace:vbscript:VBScript_SetScriptState (0x12d688)->(1) 007e:trace:vbscript:ScriptDisp_AddRef (0x144c30) ref=2 007e:trace:vbscript:interp_string 007e:trace:vbscript:interp_string 007e:trace:vbscript:interp_mcall 007e:fixme:vbscript:stack_pop_disp not supported type: 0x144d70 {VT_BSTR: L"wscript.shell"} 007e:warn:vbscript:exec_script Failed 80004005 007e:trace:vbscript:ScriptDisp_Release (0x144c30) ref=1 007e:trace:vbscript:VBScript_Close (0x12d688)->() ... --- snip --- $ wine --version wine-2.8 Regards -- 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.
https://bugs.winehq.org/show_bug.cgi?id=41119 Jacek Caban <jacek(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rebe(a)gmx.net --- Comment #9 from Jacek Caban <jacek(a)codeweavers.com> --- *** Bug 48041 has been marked as a duplicate of this bug. *** -- 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.
https://bugs.winehq.org/show_bug.cgi?id=41119 Jacek Caban <jacek(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |509044296dde3688cfdaaf02325 | |a1bc8f890bd85 Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #10 from Jacek Caban <jacek(a)codeweavers.com> --- Fixed in git. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=41119 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #11 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 4.20. -- 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 (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla