Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-17
04:21 • Ticket [218474ffff] Calltraces bug in tcl8.1a2 status still Closed with 3 ot... artifact: da88905a02 user: dgp
2000-10-26
08:22 • Closed ticket [218474ffff]. artifact: 4acecadb1c user: welch
01:01 • New ticket [218474ffff]. artifact: e779c34f8d user: nobody

Calltraces bug in tcl8.1a2

Closed / Fixed218474ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:01:01
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
welch Closed ticket [218474ffff]. [History diff]2000-10-26 08:22:18
dgp Ticket [218474ffff]: 3 changes [History diff]2001-04-17 04:21:34
Log in (anonymous is fine) to add a comment.