[Bug 56464] New: vbscript: Join on array with "empty" items fails
https://bugs.winehq.org/show_bug.cgi?id=56464 Bug ID: 56464 Summary: vbscript: Join on array with "empty" items fails Product: Wine Version: 9.4 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: vbscript Assignee: wine-bugs(a)winehq.org Reporter: francisdb(a)gmail.com Distribution: ---
cat test.vbs Dim u Dim arr, arr1 'first item not empty arr = array("test", u) WScript.Echo "Join arr = " & Join(arr,"") 'first item is empty arr1 = array(u, "test") WScript.Echo "Join arr1 = " & Join(arr1,"")
Wine
wine wscript test.vbs 0114:fixme:vbscript:Global_Join 0114:fixme:wscript:ActiveScriptSite_OnScriptError ()
Windows
cscript test.vbs Microsoft (R) Windows Script Host Version 5.812 Copyright (C) Microsoft Corporation. All rights reserved.
Join arr = test Join arr1 = test On a vpinball where wine vbscript is embedded we get a segfault: free(): double free detected in tcache 2 -- 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=56464 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|vbscript: Join on array |vbscript: Join() builtin is |with "empty" items fails |not implemented Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Nikolay Sivov <bunglehead(a)gmail.com> --- This is not specific to empty variants, Join() is not implemented at all. -- 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=56464 --- Comment #2 from francisdb <francisdb(a)gmail.com> --- Sorry about the confusion. Looks like vpinball implements the join. If the join not being implemented is on purpose I guess this can be closed? -- 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=56464 --- Comment #3 from francisdb <francisdb(a)gmail.com> --- In case somebody wants to implement this https://github.com/vpinball/vpinball/blob/9cd01e63b6271b2cc59a180a7335093b2c... But keep in mind that this fails when the first item is empty. (will be fixed on a later commit at the vpinball side) -- 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=56464 --- Comment #4 from Nikolay Sivov <bunglehead(a)gmail.com> --- (In reply to francisdb from comment #2)
Sorry about the confusion.
Looks like vpinball implements the join. If the join not being implemented is on purpose I guess this can be closed?
It's not on purpose, no. We'll need it implemented, with some tests. -- 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=56464 Jason Millard <jsm174(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jsm174(a)gmail.com --- Comment #5 from Jason Millard <jsm174(a)gmail.com> --- (In reply to francisdb from comment #3)
In case somebody wants to implement this
https://github.com/vpinball/vpinball/blob/ 9cd01e63b6271b2cc59a180a7335093b2cfde200/standalone/inc/wine/dlls/vbscript/ global.c#L2887-L2989
But keep in mind that this fails when the first item is empty. (will be fixed on a later commit at the vpinball side)
In vpinball's implementation of GlobalJoin, we were forgetting to NULL out the conv_str in the loop. This is fixed now. I'm sure if this was implemented in Wine, it would be done the right way. I took bits and pieces from all the other global string functions to hopefully make the code similar. -- 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=56464 --- Comment #6 from francisdb <francisdb(a)gmail.com> --- This is with the fix https://github.com/vpinball/vpinball/blob/5b459c5c0fa0b50b0b5f475781b05b0cbc... -- 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=56464 Vijay Kamuju <infyquest(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |infyquest(a)gmail.com --- Comment #7 from Vijay Kamuju <infyquest(a)gmail.com> --- its not implemented, please create a MR. -- 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=56464 --- Comment #8 from francisdb <francisdb(a)gmail.com> --- https://gitlab.winehq.org/wine/wine/-/merge_requests/7052 -- 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=56464 Robert Wilhelm <sloper42(a)yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sloper42(a)yahoo.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=56464 Robert Wilhelm <sloper42(a)yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch -- 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=56464 Robert Wilhelm <sloper42(a)yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |7b8663e465e92fb2c1052fd8ad4 | |7f0dcbf37a83c --- Comment #9 from Robert Wilhelm <sloper42(a)yahoo.com> --- Join() is implemented now and got merged with https://gitlab.winehq.org/wine/wine/-/commit/7b8663e465e92fb2c1052fd8ad47f0d... Thanks! -- 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=56464 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #10 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 10.2. -- 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)
-
WineHQ Bugzilla