Tk Source Code

View Ticket
Login
Ticket UUID: 220675
Title: unpredictable segfaults in test suite
Type: Bug Version: obsolete: 8.3b2
Submitter: welch Created on: 2000-10-31 23:50:28
Subsystem: 67. Unix Window Operations Assigned To: nobody
Priority: 2 Severity:
Status: Closed Last Modified: 2001-03-24 04:29:46
Resolution: Fixed Closed By: dgp
    Closed on: 2001-03-23 21:29:46
Description:
OriginalBugID: 4153 Bug
Version: 8.3b2
SubmitDate: '2000-02-10'
LastModified: '2000-02-22'
Severity: CRIT
Status: Released
Submitter: techsupp
ChangedBy: hobbs
OS: Linux-Red Hat
OSVersion: 5.1
Machine: Digital Alpha XL 300
FixedDate: '2000-02-22'
FixedInVersion: 8.3


Name:
Don Porter

CVS:
$Id: tkError.c,v 1.2 1998/09/14 18:23:09 stanton Exp $

Comments:
I'm using XFree86-3.3.5-1.5.x and fvwm2-2.0.46-12

ReproducibleScript:
source ./../tests/defs.tcl
set tcltest::verbose bps
set tcltest::testSingleFile false
source ./../tests/winfo.test
source ./../tests/winfo.test

ObservedBehavior:
When running the Tk test suite (tktest ./../tests/all.tcl),
tktest sometimes segfaults.  It does not always do so, and it
does not always do so in the same place.  I've observed
segfaults in the following places:

in unixWm-50.6
in winfo-13.4
in winfo.test after winfo-13.4
in xmfbox.test before end of xmfbox-1.1

I trapped the first of these in a debugger and
got the following stack trace:

Program received signal SIGSEGV, Segmentation fault.
Tk_DeleteErrorHandler (handler=0x120413e00) at ./../generic/tkError.c:195
(xxgdb) info stack
#0  Tk_DeleteErrorHandler (handler=0x120413e00) at ./../generic/tkError.c:195
#1  0x12006d7a0 in Tk_CoordsToWindow (rootX=254, rootY=153, tkwin=0x120356130) at ./tkUnixWm.c:3649
#2  0x1200f9890 in Tk_WinfoObjCmd (clientData=0x120356130, interp=0x12031f560, objc=4, objv=0x11fffc8c8) at ./../generic/tkCmds.c:1312
#3  0x120186b6c in EvalObjv (interp=0x12031f560, objc=4, objv=0x11fffc8c8, command=0x12055ffed "winfo containing [expr $x +249] [expr $y +80]]  [winfo containing [expr $x +250] [expr $y +80]]\n", length=45, flags=0) at ./../generic/tclParse.c:932
#4  0x1201877ec in Tcl_EvalEx (interp=0x12031f560, script=0x12055ffed "winfo containing [expr $x +249] [expr $y +80]]  [winfo containing [expr $x +250] [expr $y +80]]\n", numBytes=45, flags=0) at ./../generic/tclParse.c:1393
#5  0x12018712c in Tcl_EvalTokens (interp=0x12031f560, tokenPtr=0x11fffcba0, count=1) at ./../generic/tclParse.c:1192
#6  0x120187748 in Tcl_EvalEx (interp=0x12031f560, script=0x12055fe20 "\n    eval destroy [winfo children .]\n    toplevel .t -width 300 -height 400 -bg orange\n    wm geom .t +0+50\n    frame .t.f -container 1\n    place .t.f -x 150 -y 50\n    tkwait visibility .t.f\n    tople"..., numBytes=557, flags=262144) at ./../generic/tclParse.c:1381
   ....

DesiredBehavior:
No crashes in the test suite.



This was due to the change in Tk_CoordsToWindow with an odd goto
that could be reached from above or below.  It was fixed for 8.3.0. 
-- 02/22/2000 hobbs