Skip to content
Tcl Source Code History Of Ticket 218775ffffffffff
Login

History Of Ticket 218775ffffffffff

Artifacts Associated With Ticket 218775ffffffffff

  1. Ticket change [213f74eb04] (rid 130549) by nobody on 2000-10-26 01:05:13:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 2092 Bug
      Version: 8.1
      SubmitDate: '1999-05-18'
      LastModified: '1999-11-08'
      Severity: CRIT
      Status: Released
      Submitter: pat
      ChangedBy: hobbs
      OS: Linux
      OSVersion: 2.2.1
      Machine: Other
      FixedDate: '1999-11-08'
      FixedInVersion: 8.2.2
      ClosedDate: '2000-10-25'
      
      
      Name:
      Robert Woodside
      
      ReproducibleScript:
      It can't be done with a short script - it appears to require quite a
          large program containng a large number of scalar global vars - see
          description below.
      
      ObservedBehavior:
      I am getting bug reports that my popular shareware offering, TkZip,
          causes the Tcl interpreter to segfault with the new 8.1 release. (I
          have
          reports specifically on SGI and Linux systems so far.)
          
          The bug seems to have to do with a very large program containing a
          large number of global scalar variables.
          
          Unfortunately, I have been unable to cause this to occur with a small,
          manageable snippet of code - it seems to require a rather large program
          
          
          The program is rather too large to include inline (682K); however, it
          can be fetched from the TkZip home page at
          http://www.pcnet.com/~proteus/TkZip.
          Version 1.0.8 (http://www.pcnet.com/~proteus/TkZip/TkZip-1.0.8.tar.gz)
          is the
          one that segfaults; I will leave it there for a while; I have released a
          1.0.9
          version which has a workaround for the problem.
          
                       ------------------------------------------------------
          
          Here is what happens with version 1.0.8 under Tcl 8.1. The segfault
          occurs at line 436 in TkZip, which reads:
          
          > catch {puts $si "\n================\nXserver probe response:\n
          $tmp\n================\n"}
          
          The error has nothing to do with this line of code, however, A stack
          trace
          shows the following:
          
          > #0  0x402c4ede in strlen (str=0x804a030 "|¡\004\b")
          > (gdb) bt
          > #0  0x402c4ede in strlen (str=0x804a030 "|¡\004\b")
          > #1  0x818d900 in ?? ()
          > #2  0x4016bbf8 in Tcl_AppendResult (arg1=0x804a030)
          >     at ./../generic/tclResult.c:543
          > #3  0x40177dd1 in VarErrMsg (interp=0x804a030, part1=0x21 "7",
          part2=0x0,
          >     operation=0x40189ff8 "read", reason=0x40189ef1 "variable is
          array")
          >     at ./../generic/tclVar.c:4649
          > #4  0x40173a37 in TclGetIndexedScalar (interp=0x804a030,
          localIndex=-124,
          >     leaveErrorMsg=1) at ./../generic/tclVar.c:766
          > #5  0x40137776 in TclExecuteByteCode (interp=0x804a030,
          codePtr=0x8196e70)
          >     at ./../generic/tclExecute.c:1070
          > #6  0x40113c9a in Tcl_EvalObjEx (interp=0x804a030, objPtr=0x807f1c0,
          flags=0)
          >     at ./../generic/tclBasic.c:2699
          > #7  0x40169c97 in TclObjInterpProc (clientData=0x8051b40,
          interp=0x804a030,
          >     objc=1, objv=0xbfffee40) at ./../generic/tclProc.c:995
          > #8  0x4016089f in EvalObjv (interp=0x804a030, objc=1,
          objv=0xbfffee40,
          >     command=0x404a94d2 "\n\n\n\n#", '-' <repeats 30 times>, "\n#
          Here's the real
          >  program...\n#   Not very impressive, huh?\n#", '-' <repeats 30
          times>, "\n\nIni
          > t\nBuildMainFrame\n# If cmd line arg specified a file, open up a
          window"...,
          >     length=428, flags=0) at ./../generic/tclParse.c:923
          > #9  0x401611a8 in Tcl_EvalEx (interp=0x804a030,
          >     script=0x403ff008 "#!/bin/sh\n# the next line restarts using wish
          \\\nexec w
          > ish \"$0\" \"$@\"\n#  TkZip  Copyright © 1996, 1998 by Robert
          Woodside.\n#  A T
          > k/Tcl program for managing zipped & tarred archives\n\n#", '-'
          <repeats 18 times
          > >..., numBytes=697974, flags=0) at ./../generic/tclParse.c:1384
          > #10 0x40155e3f in Tcl_EvalFile (interp=0x804a030,
          >     fileName=0xbffff26c "./TkZipt") at ./../generic/tclIOUtil.c:323
          > #11 0x4003face in Tk_MainEx (argc=1, argv=0xbffff3a8,
          >     appInitProc=0x804881c <Tcl_AppInit>, interp=0x804a030)
          >     at ./../generic/tkMain.c:229
          > #12 0x804880e in main (argc=2, argv=0xbffff3a4) at ./tkAppInit.c:54
          > #13 0x804874e in ___crt_dummy__ ()
          > (gdb)                  
          
          The "error" being reported in VarErrMsg is clearly bogus, and the
          interpreter
          has got its addressability messed up somewhere prior to this.
          
          Over several years of "feeping creaturism", the program had acquired
          a very large number of global scalar variables, and most of the code
          prior to
          this point is just initializing them. I found that if I mashed about 40
          or so
          of them into one indexed array, the problem went away, so I embarked on
          a major
          code cleanup as a workaround.
          
          If you need any additional information, please don't hesitate to
          contact me.
      
      DesiredBehavior:
      Um...I'd expect to see the Tcl interpreter not segfault, or try to
          report bogus errors.
      
      
      
      Fixed in 8.2.[12]. 
      -- 11/08/1999 hobbs
      
    4. foundin initialized to: "obsolete: 8.1"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "10. Objects"
    10. title initialized to:
      Segfault in large pgm with large no. of scalar globals
      
    11. type initialized to: "Bug"
  2. Ticket change [2194e11c5f] (rid 130613) by welch on 2000-10-26 08:28:15:

    1. closedate changed to: "2000-10-26T01:28:15"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"