Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-05
06:54 • Ticket [218299ffff] fatal va_arg() bug in tclStringObj.c for LINUX/PPC statu... artifact: 4e5c3a0471 user: dgp
2000-10-26
08:18 • Closed ticket [218299ffff]. artifact: 48fdd49f4f user: welch
00:55 • New ticket [218299ffff]. artifact: 7fdcdf6bf1 user: nobody

fatal va_arg() bug in tclStringObj.c for LINUX/PPC

Closed / Fixed218299ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:55:53
OriginalBugID: 3575 Bug
Version: 8.2.2
SubmitDate: '1999-11-12'
LastModified: '2000-02-25'
Severity: CRIT
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
OS: Linux
OSVersion: Linux diehard.phx.mcd.mot.com 2.2.13-15aprep #1 SMP Fri Oct 15 1
Machine: Power PC based system
FixedDate: '2000-10-25'
ClosedDate: '2000-02-25'


Name: Guy Cole

Comments:
I would be happy to test any solution you could offer.

ReproducibleScript:
'make test' fails w/this message:make: *** [test] Error 139

ObservedBehavior:
Using gdb, I discover this failure occurs in tclStringOBj.c at line 1197 which is a result
of the call to va_arg() at 1193, the variable "string" comes back w/a bogus address

I was unsure if this was a tcl or a gcc issue.  I wrote a small C program which exercises va_arg()
but I could not reproduce the problem outside of tcl.  I have tried alternate versions of gcc w/no
improvement.  (gcc version 2.95.2 19991024 (release))

Following dump made via gdb

#0  0x164d94c in strlen () at soinit.c:59
#1  0x1887790 in Tcl_AppendStringsToObjVA (objPtr=0x192ae60, 
    argList=0x7fffdbc0) at ./../generic/tclStringObj.c:1197
#2  0x1887b64 in Tcl_AppendStringsToObj (arg1=0x192ae60)
    at ./../generic/tclStringObj.c:1274
#3  0x1853e58 in Tcl_WrongNumArgs (interp=0x1911448, objc=1, objv=0x1912f1c, 
    message=0x1905e1c "varName ?value value ...?")
    at ./../generic/tclIndexObj.c:330
#4  0x18932d4 in Tcl_AppendObjCmd (dummy=0x0, interp=0x1911448, objc=1, 
    objv=0x1912f1c) at ./../generic/tclVar.c:2625
#5  0x1843e08 in TclExecuteByteCode (interp=0x1911448, codePtr=0x1956458)
    at ./../generic/tclExecute.c:843
#6  0x1819744 in Tcl_EvalObjEx (interp=0x1911448, objPtr=0x195a1f8, flags=0)
    at ./../generic/tclBasic.c:2698
#7  0x181fba4 in Tcl_CatchObjCmd (dummy=0x0, interp=0x1911448, objc=3, 
    objv=0x1912f10) at ./../generic/tclCmdAH.c:261
#8  0x1843e08 in TclExecuteByteCode (interp=0x1911448, codePtr=0x194f518)
    at ./../generic/tclExecute.c:843
#9  0x1819744 in Tcl_EvalObjEx (interp=0x1911448, objPtr=0x195b5f0, flags=0)
    at ./../generic/tclBasic.c:2698
#10 0x187faa8 in Tcl_UplevelObjCmd (dummy=0x0, interp=0x1911448, objc=1, 
    objv=0x1912f08) at ./../generic/tclProc.c:603

etc, etc.



This is new code for 8.2.2, an issue that in fact was changed
specifically for Linux PPC (and 'better' portability in general).
This was reported to work on Linux PPC, but this user is getting
an error.  The fix was also made in tclResult.c/Tcl_AppendResultVA. 
-- 11/12/1999 hobbs
This was verified to work as expected.  The user may be picking up
an 8.2.1 library somehow. 
-- 02/25/2000 hobbs
welch Closed ticket [218299ffff]. [History diff]2000-10-26 08:18:59
dgp Ticket [218299ffff]: 3 changes [History diff]2001-04-05 06:54:27
Log in (anonymous is fine) to add a comment.