Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e779c34f8d122697d31782657f29596ba862cc76
Ticket: 218474ffffffffffffffffffffffffffffffffff
Calltraces bug in tcl8.1a2
User & Date: nobody on 2000-10-26 01:01:01
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 661 Bug
    Version: 8.1a2
    SubmitDate: '1998-05-25'
    LastModified: '1998-12-08'
    Severity: SER
    Status: Released
    Submitter: hershey
    ChangedBy: stanton
    OS: All
    OSVersion: NA
    Machine: NA
    FixedDate: '1998-12-08'
    FixedInVersion: 8.1b1
    ClosedDate: '2000-10-25'
    
    
    I found a bug in tcl8.1a2/tk8.1a2. The following script works fine
    
    with tcl8.0/tk8.0, but wish8.1 dumps core on both of SGI and
    
    Windows95/NT when Return is pressed in the entry.
    
    
    As shown in the output of dbx, a variable "part1" in CallTraces() in
    
    tclVar.c is set to null, causing SIGSEGV: Segmentation violation.
    
    
    I hope this will help.
    
    ----------------------------------------------------------
    
    #/bin/sh
    
    # \
    
          exec wish8.1 "$0" "$@"
    
    
    set buffer ""
    
    pack [entry .entry -textvariable buffer]
    
    focus .entry    
    
    set finish 0    
    
    update
    
    
    proc func {} {
    
        global buffer finish
    
        set buffer default_string
    
        tkwait variable finish
    
        set buffer AAAA$buffer
    
        puts $buffer
    
    }
    
    
    bind .entry <Return> {global finish; set finish 1}
    
    func
    
    ----------------------------------------------------------
    
    % dbx wish
    
    Current directory is /usr/local/src/tk8.1a2/unix/
    
    dbx version 7.1 Dec  3 1996 17:03:19
    
    Core from signal SIGSEGV: Segmentation violation
    
    (dbx) list
    
    >*3792          for (p = part1; *p ; p++) {
    
      3793              if (*p == '(') {
    
      3794                  openParen = p;
    
      3795                  do {
    
      3796                      p++;
    
      3797                  } while (*p != '\0');
    
      3798                  p--;
    
      3799                  if (*p == ')') {
    
      3800                      Tcl_DStringInit(&nameCopy);
    
      3801                      Tcl_DStringAppend(&nameCopy, part1, (p-part1));
    
    (dbx) where
    
    >  0 CallTraces(iPtr = 0x100502c0, arrayPtr = (nil), varPtr = 0x10082a80,
    
         part1 = (nil), part2 = (nil), flags = 16)
    
         ["/usr/local/src/tcl8.1a2/unix/./../generic/tclVar.c":3792, 0x4eda10]
    
       1 TclGetIndexedScalar(interp = 0x100502c0, localIndex = 0, leaveErrorMsg = 1)
    
          ["/usr/local/src/tcl8.1a2/unix/./../generic/tclVar.c":641, 0x4e8720]
    
       2 TclExecuteByteCode(interp = 0x100502c0, codePtr = 0x100a38f8)
    
          ["/usr/local/src/tcl8.1a2/unix/./../generic/tclExecute.c":1068, 0x508dc8]
    
       3 Tcl_EvalObj(interp = 0x100502c0, objPtr = 0x1006ffc8, flags = 0)
    
          ["/usr/local/src/tcl8.1a2/unix/./../generic/tclBasic.c":2587, 0x4f2560]
    
       4 TclObjInterpProc(clientData = 0x100a0b00, interp = 0x100502c0,
    
          objc = 1, objv = 0x7fff29c8)
    
          ["/usr/local/src/tcl8.1a2/unix/./../generic/tclProc.c":854, 0x539498]
    
       5 Tcl_EvalObjv(interp = 0x100502c0, objc = 1, objv = 0x7fff29c8,
    
          command = 0x1008194c = "func\n\n\n\n\n", length = 9, flags = 0)
    
          ["/usr/local/src/tcl8.1a2/unix/./../generic/tclParse.c":901, 0x51d9ac]
    
       .
    
       .
    
       .
    
    
    -------------------
    
     From: Tsutomu Hoshino <[email protected]>
    
    
    
    This has been fixed in 8.1a3
    
  4. foundin changed to: "obsolete: 8.1a2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "Calltraces bug in tcl8.1a2"
  11. type changed to: "Bug"