Artifacts Associated With Ticket 219416
Ticket change [2eb5a00a5a] (rid 92936) by nobody on 2000-10-26 05:12:39:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 6364 Bug Version: 8.3.2 SubmitDate: '2000-10-16' LastModified: '2000-10-25' Severity: CRIT Status: UnAssn Submitter: techsupp OS: Windows NT OSVersion: Windown NT, 4.0 SP 5 Machine: Dual Pentium III, >500MHz FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: Jens-Achim Kessel CVS: Id: tclWinInit.c,v 1.22 2000/03/31 08:52:31 hobbs Exp Extensions: Tcl 8.3.2 / Tk 8.3.2 / Tix 8.0 CustomShell: (For easy bugfixing in our own packages i've compiled all libraries as hidden debug-version, e.g. tcl8.3.dll does contain debug information. It's better for our purposals.) ReproducibleScript: Tcl is embedded in a LabVIEW environment. The application works fine in Development environment and crashes with a RuntimeError #3 if started from the Runtime Environment. Following up the program with C++ Debugger, it crashes in Line 293 ckfree(...) of tclWinInit.c. At this point no Tcl script was executed. It's still in the basic initialization part of Tcl, inside Tcl_FindExecutable(...). ObservedBehavior: Inside TclpInitLibraryPath(), Line 279/280: if (pathc > 1) { pathv[pathc - 3] = developLib; will access element [-1] if started as 'K:\myApp.exe' => crash follows, when memory of pathv if freed. DesiredBehavior: Should better be: if (pathc > 2) { pathv[pathc - 3] = developLib; I changed the line and it works fine now without a crash! Patch: *** tclWinInit.c.old Mon Oct 16 17:59:41 2000 --- tclWinInit.c.new Mon Oct 16 16:00:12 2000 *************** *** 276,282 **** Tcl_ListObjAppendElement(NULL, pathPtr, objPtr); Tcl_DStringFree(&ds); } ! if (pathc > 1) { pathv[pathc - 3] = developLib; path = Tcl_JoinPath(pathc - 2, pathv, &ds); objPtr = Tcl_NewStringObj(path, Tcl_DStringLength(&ds)); --- 276,282 ---- Tcl_ListObjAppendElement(NULL, pathPtr, objPtr); Tcl_DStringFree(&ds); } ! if (pathc > 2) { pathv[pathc - 3] = developLib; path = Tcl_JoinPath(pathc - 2, pathv, &ds); objPtr = Tcl_NewStringObj(path, Tcl_DStringLength(&ds)); PatchFiles: tcl8.3.2/win/tclWinInit.c - foundin initialized to: "obsolete: 8.3.2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to:
Application crashes if sarted in top level dir, e.g. K:\myAp
- type initialized to: "Bug"
Ticket change [17ed1505db] (rid 122579) by dkf on 2000-11-19 18:43:02:
- icomment:
Seems to work for me in 8.3.0; strange...
- login: "dkf"
- mimetype: "text/plain"
- subsystem changed to: "90. FAQs"
- username: "dkf"
- icomment:
Ticket change [d028e83201] (rid 113117) by dgp on 2000-12-21 05:34:16:
- icomment:
Confirmed. The buggy code may attempt to access pathv[-1]. The same bug is also present in the Unix initialization. To demonstrate it there: $ configure --disable-shared $ make $ cp ./tclsh / $ /tclsh Segmentation fault Patch 102972 contains a fix.
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "9 Immediate"
- username: "dgp"
- icomment:
Ticket change [1e1790296c] (rid 90918) by dgp on 2000-12-21 05:40:51:
- assignee changed to: "dgp"
- foundin changed to: "obsolete: 8.4a2"
- subsystem changed to: "69. Other"
Ticket change [7139b5b364] (rid 100634) by dgp on 2001-01-05 04:33:06:
- closedate changed to: "2001-01-04T21:33:06"
- closer changed to: "dgp"
- icomment:
Fixed by integration of Patch 102972.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"
Ticket change [d033333a43] (rid 113129) by dgp on 2001-04-20 02:58:03:
- closedate changed to: "2001-04-19T19:58:03"
- closer changed to: "dgp"
- subsystem changed to: "38. Init - Library - Autoload"