Artifacts Associated With Ticket 671138ffffffffffffffffffffffffffffffffff
Ticket change [7900157402] (rid 90049) by lvirden on 2003-01-20 12:40:47:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Platform: SPARC Solaris 2.6 Compiler: Sun C configuration options: --prefix=/usr/tcl84 --enable-shared --enable-symbols After building a clean copy of the Tcl CVS snapshot at activestate on Jan 20, 2003, and running the test suite successfully, I find that Expect is crashing with the following error. $ rlogin-cwd srv25 spawn rlogin srv25 Last login: Mon Jan 20 07:35:55 from lwv26awu Segmentation Fault(coredump) srv23s4d (247) $ dbx $(whence expect) core Reading expect core file header read successfully Reading ld.so.1 Reading libexpect5.38g.so Reading libtcl8.4g.so Reading libdl.so.1 Reading libsocket.so.1 Reading libnsl.so.1 Reading libm.so.1 Reading libc.so.1 Reading libmp.so.2 Reading libc_psr.so.1 program terminated by signal SEGV (no mapping at the fault address) Current function is TableToUtfProc 2079 *dst++ = (char) ch; (dbx 1) print dst dst = 0x2f "" (dbx 2) print ch ch = 83U (dbx 3) where =>[1] TableToUtfProc(clientData = 0x31318, src = 0x4d488 "Sun Microsystems Inc. SunOS 5.8 Generic February 2000^M\n", srcLen = 63, flags = 0, statePtr = 0x4589c, dst = 0x2f "", dstLen = 65, srcReadPtr = 0xefffda64, dstWrotePtr = 0xefffda60, dstCharsPtr = 0xefffda5c), line 2079 in "tclEncoding.c" [2] Tcl_ExternalToUtf(interp = (nil), encoding = 0x31430, src = 0x4d488 "Sun Microsystems Inc. SunOS 5.8 Generic February 2000^M\n", srcLen = 63, flags = 0, statePtr = 0x4589c, dst = 0x2f "", dstLen = 65, srcReadPtr = 0xefffda64, dstWrotePtr = 0xefffda60, dstCharsPtr = 0xefffda5c), line 921 in "tclEncoding.c" [3] ReadChars(statePtr = 0x45890, objPtr = 0x37530, charsToRead = 3986, offsetPtr = 0xefffdb08, factorPtr = 0xefffdb04), line 4705 in "tclIO.c" [4] DoReadChars(chanPtr = 0x451b0, objPtr = 0x37530, toRead = 3986, appendFlag = 1), line 4408 in "tclIO.c" [5] Tcl_ReadChars(chan = 0x451b0, objPtr = 0x37530, toRead = 3986, appendFlag = 1), line 4335 in "tclIO.c" [6] expIRead(interp = 0x2a1c8, esPtr = 0x45b50, timeout = 60, save_flags = 0), line 1655 in "expect.c" [7] expRead(interp = 0x2a1c8, esPtrs = 0x34ca8, esPtrsMax = 1, esPtrOut = 0xefffdd6c, timeout = 60, key = 8), line 1723 in "expect.c" [8] Exp_ExpectObjCmd(clientData = (nil), interp = 0x2a1c8, objc = 7, objv = 0xefffdeb8), line 2526 in "expect.c" [9] TclEvalObjvInternal(interp = 0x2a1c8, objc = 7, objv = 0xefffdeb8, command = 0x46a8d "expect eof exit timeout {send_user "timed out\n"; exit} -re $prompt\nsend "cd [pwd]\r"\ninteract\n", length = 68, flags = 0), line 3055 in "tclBasic.c" [10] Tcl_EvalEx(interp = 0x2a1c8, script = 0x46950 "#!/bin/sh\n# \\nexec expect "$0" ${1+"$@"}\n# rlogin-cwd - rlogin but with same directory\n#\n# You can extend this idea to save any arbitrary information across rlogin\n# Don Libes - Oct 17, 1991.\n\nset prompt "(%|#|\\$) $"^I^I;# default prompt\ncatch {set prompt $env(EXPECT_PROMPT)}\n\neval spawn rlogin $argv\nset timeout 60\nexpect eof exit timeout {send_user "timed out\n"; exit} -re $prompt\nsend "cd [pwd]\r"\ninteract\n", numBytes = 412, flags = 0), line 3654 in "tclBasic.c" [11] Tcl_FSEvalFile(interp = 0x2a1c8, pathPtr = 0x329a0), line 1390 in "tclIOUtil.c" [12] Tcl_EvalFile(interp = 0x2a1c8, fileName = 0xefffe6f3 "/usr/tcl84/bin/rlogin-cwd"), line 234 in "tclIOUtil.c" [13] exp_interpret_cmdfilename(interp = 0x2a1c8, filename = 0xefffe6f3 "/usr/tcl84/bin/rlogin-cwd"), line 862 in "exp_main_sub.c" [14] main(argc = 3, argv = 0xefffe474), line 44 in "exp_main_exp.c" (dbx 4) The error appears to be in tclEncoding.c - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "lvirden"
- subsystem initialized to: "None"
- title initialized to: "TableToUtfProc/tclEncoding error"
- type initialized to: "Bug"
Ticket change [bba3d98b83] (rid 129522) by lvirden on 2003-01-20 19:43:39:
- priority changed to: "9 Immediate"
- subsystem changed to: "44. UTF-8 Strings"
Ticket change [b4d7903d92] (rid 125115) by lvirden on 2003-01-20 19:58:37:
- icomment:
Logged In: YES user_id=15949 After looking into the core a bit, I discover that dst has what appears tobe a length instead of an address. Poking up the stack trace, the problem appears to be in tclIO.c, line 4673, which reads: dst = objPtr->bytes + offset; (dbx 18) print objPtr objPtr = 0x37530 [You have mail] (dbx 19) print objPtr->bytes objPtr->bytes = (nil) So instead of getting an offset in this objPtr, we get nonsense. print *objPtr *objPtr = { refCount = 1 bytes = (nil) length = 114 typePtr = 0xef6cfd5c internalRep = { longValue = 313440 doubleValue = 6.6511836072015e-309 otherValuePtr = 0x4c860 wideValue = 1346214549258240LL twoPtrValue = { ptr1 = 0x4c860 ptr2 = (nil) } } } print *objPtr->typePtr *objPtr->typePtr = { name = 0xef6d90ac "string" freeIntRepProc = 0xef685508 = &`libtcl8.4g.so`tclStringObj.c`FreeStringInternalRep(Tcl_Obj *objPtr) dupIntRepProc = 0xef685090 = &`libtcl8.4g.so`tclStringObj.c`DupStringInternalRep(register Tcl_Obj *srcPtr, register Tcl_Obj *copyPtr) updateStringProc = 0xef685318 = &`libtcl8.4g.so`tclStringObj.c`UpdateStringOfString(Tcl_Obj *objPtr) setFromAnyProc = 0xef6851d0 = &`libtcl8.4g.so`tclStringObj.c`SetStringFromAny(Tcl_Interp *interp, register Tcl_Obj *objPtr) } print *objPtr->internalRep->twoPtrValue->ptr1 *objPtr->internalRep.twoPtrValue.ptr1 = (void) - login: "lvirden"
- mimetype: "text/plain"
- subsystem changed to: "25. Channel System"
- username: "lvirden"
- icomment:
Ticket change [696268fcf7] (rid 103240) by hobbs on 2003-01-21 00:52:22:
- assignee changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=72656 This is due to the changes in Tcl_SetObjLength by Vince recently. He's looking into it.
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
Ticket change [94cca3737b] (rid 106058) by andreas_kupries on 2003-01-21 01:15:06:
- icomment:
Logged In: YES user_id=75003 See also Tcl Bug 635200.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [27b30f0a9f] (rid 88565) by vincentdarley on 2003-01-24 19:04:03:
- closedate changed to: "2003-01-24T12:04:03"
- closer changed to: "vincentdarley"
- foundin changed to: "obsolete: 8.4.1"
- icomment:
Logged In: YES user_id=32170 Fixed now.
- login: "vincentdarley"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "vincentdarley"
Ticket change [565d893263] (rid 94302) by dkf on 2003-01-24 20:11:25:
- closedate changed to: "2003-01-24T13:11:25"
- closer changed to: "dkf"
- resolution changed to: "Fixed"