Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 741d19f1714f08af0f079bd09745e452671e6a54
Ticket: 2782488fffffffffffffffffffffffffffffffff
tclsh8.5 segfaults upon sourcing 8.4 byte codes
User & Date: eriklns on 2009-04-28 05:39:15
Changes

  1. icomment:
    Uhmm, the reason for the missing symbol info was a wrong tclsh library, sorry.
    Here is the back trace from a tclsh8.5 that does have the symbols loaded:
    
    > tclsh8.5 barf.tbc
    BARFF
    Segmentation fault (core dumped)
    > gdb tclsh8.5 core
    GNU gdb 6.4
    Copyright 2005 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB.  Type "show warranty" for details.
    This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".
    
    Failed to read a valid object file image from memory.
    Core was generated by `tclsh8.5 barf.tbc'.
    Program terminated with signal 11, Segmentation fault.
    
    warning: Can't read pathname for load map: Input/output error.
    Reading symbols from /usr/local/lib/libtcl8.5.so...done.
    Loaded symbols for /usr/local/lib/libtcl8.5.so
    Reading symbols from /lib/libdl.so.2...done.
    Loaded symbols for /lib/libdl.so.2
    Reading symbols from /lib/libm.so.6...done.
    Loaded symbols for /lib/libm.so.6
    Reading symbols from /lib/libc.so.6...done.
    Loaded symbols for /lib/libc.so.6
    Reading symbols from /lib/ld-linux.so.2...done.
    Loaded symbols for /lib/ld-linux.so.2
    Reading symbols from /usr/local/lib/tbcload1.4/libtbcload1.4.so...done.
    Loaded symbols for /usr/local/lib/tbcload1.4/libtbcload1.4.so
    #0  0xb7eaf196 in TclCleanupByteCode (codePtr=0x80b0038)
        at /usr/local/src/SOURCES/tcl8.5.7/unix/../generic/tclCompile.c:830
    830         if (codePtr->localCachePtr && (--codePtr->localCachePtr->refCount == 0)) {
    (gdb) bt full
    #0  0xb7eaf196 in TclCleanupByteCode (codePtr=0x80b0038)
        at /usr/local/src/SOURCES/tcl8.5.7/unix/../generic/tclCompile.c:830
            interp = (Tcl_Interp *) 0x804e0d0
            iPtr = (Interp *) 0x804e0d0
            numLitObjects = 2
            numAuxDataItems = 0
            objArrayPtr = (Tcl_Obj **) 0x80b00b0
            objPtr = (Tcl_Obj *) 0x805f998
            auxDataPtr = (AuxData *) 0x0
            i = 0
    #1  0xb7eaef5f in FreeByteCodeInternalRep (objPtr=0x8063b80)
        at /usr/local/src/SOURCES/tcl8.5.7/unix/../generic/tclCompile.c:663
            codePtr = (ByteCode *) 0x80b0038
    #2  0xb7f0d4be in TclFreeObj (objPtr=0x8063b80)
        at /usr/local/src/SOURCES/tcl8.5.7/unix/../generic/tclObj.c:929
            context = (PendingObjData * const) 0xb7f6ee38
    #3  0xb7c58ff5 in Tbcload_EvalObjCmd (dummy=0x0, interp=0x804e0d0, objc=2, objv=0x804e968)
        at cmpRead.c:509
            sig = {formatNumber = 2, buildNumber = 0, cmpMajorVersion = 1, cmpMinorVersion = 4,
      tclMajorVersion = 8, tclMinorVersion = 4}
            cmdObjPtr = (Tcl_Obj *) 0x8063b80
            scriptPtr = 0x80b0420 "\nTclPro ByteCode 2 0 1.4 8.4\n1 0 7 2 0 0 4 0 2 1 1 -1 -1\n7\nw0E<!)'!!\n1\nz\n1\n'!\n2\nx\n4\nDP)*F\nx\n5\n=N)T7g!\n0\n0\n"
            scriptLength = 106
            result = 0
    #4  0xb7e6e4ab in TclEvalObjvInternal (interp=0x804e0d0, objc=2, objv=0x804e968,
        command=0x8061ff5 "tbcload::bceval {\nTclPro ByteCode 2 0 1.4 8.4\n1 0 7 2 0 0 4 0 2 1 1 -1 -1\n7\nw0E<!)'!!\n1\nz\n1\n'!\n2\nx\n4\nDP)*F\nx\n5\n=N)T7g!\n0\n0\n}\n", length=125, flags=0)
        at /usr/local/src/SOURCES/tcl8.5.7/unix/../generic/tclBasic.c:3690
            cmdPtr = (Command *) 0x8090aa8
            iPtr = (Interp *) 0x804e0d0
            newObjv = (Tcl_Obj **) 0x8063ee0
            i = 4
            savedVarFramePtr = (CallFrame *) 0x0
            varFramePtr = (CallFrame *) 0x804e758
            code = 0
            traceCode = 0
            checkTraces = 1
            traced = 0
    ---Type <return> to continue, or q <return> to quit---
            savedNsPtr = (Namespace *) 0x0
            lookupNsPtr = (Namespace *) 0x0
            commandPtr = (Tcl_Obj *) 0x0
    #5  0xb7e6f54a in TclEvalEx (interp=0x804e0d0,
        script=0x8061f40 "# TclPro::Compiler::Include\n\nif {[catch {package require tbcload 1.4} err] == 1} {\n    error \"The TclPro ByteCode Loader is not available or does not support the correct version\"\n}\ntbcload::bceval {\nT"..., numBytes=306, flags=0, line=6)
        at /usr/local/src/SOURCES/tcl8.5.7/unix/../generic/tclBasic.c:4338
            wordLine = 6
            wordStart = 0x8062005 "{\nTclPro ByteCode 2 0 1.4 8.4\n1 0 7 2 0 0 4 0 2 1 1 -1 -1\n7\nw0E<!)'!!\n1\nz\n1\n'!\n2\nx\n4\nDP)*F\nx\n5\n=N)T7g!\n0\n0\n}\n"
            objectsNeeded = 2
            numWords = 2
            iPtr = (Interp *) 0x804e0d0
            p = 0x8061ff5 "tbcload::bceval {\nTclPro ByteCode 2 0 1.4 8.4\n1 0 7 2 0 0 4 0 2 1 1 -1 -1\n7\nw0E<!)'!!\n1\nz\n1\n'!\n2\nx\n4\nDP)*F\nx\n5\n=N)T7g!\n0\n0\n}\n"
            next = 0x8061ff5 "tbcload::bceval {\nTclPro ByteCode 2 0 1.4 8.4\n1 0 7 2 0 0 4 0 2 1 1 -1 -1\n7\nw0E<!)'!!\n1\nz\n1\n'!\n2\nx\n4\nDP)*F\nx\n5\n=N)T7g!\n0\n0\n}\n"
            minObjs = 20
            objv = (Tcl_Obj **) 0x804e968
            objvSpace = (Tcl_Obj **) 0x804e968
            expand = (int *) 0x804e9c0
            lines = (int *) 0x804ea18
            lineSpace = (int *) 0x804ea18
            tokenPtr = (Tcl_Token *) 0x804e830
            commandLength = 134537424
            bytesLeft = 125
            expandRequested = 0
            code = 0
            savedVarFramePtr = (CallFrame *) 0x804e758
            allowExceptions = 0
            gotParse = 1
            i = 3
            objectsUsed = 2
            parsePtr = (Tcl_Parse *) 0x804e7b8
            eeFramePtr = (CmdFrame *) 0x804e938
            stackObjArray = (Tcl_Obj **) 0x804e968
            expandStack = (int *) 0x804e9c0
            linesStack = (int *) 0x804ea18
    ---Type <return> to continue, or q <return> to quit---
    #6  0xb7e6ec37 in Tcl_EvalEx (interp=0x804e0d0,
        script=0x8061f40 "# TclPro::Compiler::Include\n\nif {[catch {package require tbcload 1.4} err] == 1} {\n    error \"The TclPro ByteCode Loader is not available or does not support the correct version\"\n}\ntbcload::bceval {\nT"..., numBytes=306, flags=0)
        at /usr/local/src/SOURCES/tcl8.5.7/unix/../generic/tclBasic.c:4043
    No locals.
    #7  0xb7ef90dd in Tcl_FSEvalFileEx (interp=0x804e0d0, pathPtr=0x805fb00, encodingName=0x0)
        at /usr/local/src/SOURCES/tcl8.5.7/unix/../generic/tclIOUtil.c:1814
            length = 306
            result = 1
            statBuf = {st_dev = 778, __pad1 = 0, __st_ino = 902179, st_mode = 33188, st_nlink = 1,
      st_uid = 1000, st_gid = 100, st_rdev = 0, __pad2 = 0, st_size = 306, st_blksize = 4096,
      st_blocks = 8, st_atim = {tv_sec = 1240870977, tv_nsec = 0}, st_mtim = {tv_sec = 1240869651,
        tv_nsec = 0}, st_ctim = {tv_sec = 1240869651, tv_nsec = 0}, st_ino = 902179}
            oldScriptFile = (Tcl_Obj *) 0x0
            iPtr = (Interp *) 0x804e0d0
            string = 0x8061f40 "# TclPro::Compiler::Include\n\nif {[catch {package require tbcload 1.4} err] == 1} {\n    error \"The TclPro ByteCode Loader is not available or does not support the correct version\"\n}\ntbcload::bceval {\nT"...
            chan = (Tcl_Channel) 0x8062708
            objPtr = (Tcl_Obj *) 0x8063e68
    #8  0xb7f01a1e in Tcl_Main (argc=-1, argv=0xbfe40acc, appInitProc=0x804869b <Tcl_AppInit>)
        at /usr/local/src/SOURCES/tcl8.5.7/unix/../generic/tclMain.c:441
            path = (Tcl_Obj *) 0x805fb00
            resultPtr = (Tcl_Obj *) 0x0
            argvPtr = (Tcl_Obj *) 0x805faa0
            commandPtr = (Tcl_Obj *) 0x0
            encodingName = 0x0
            prompt = PROMPT_START
            code = 0
            length = 8
            tty = 1
            exitCode = 0
            inChannel = (Tcl_Channel) 0x0
            outChannel = (Tcl_Channel) 0x804a000
            errChannel = (Tcl_Channel) 0xb7e49ddc
            interp = (Tcl_Interp *) 0x804e0d0
            appName = {string = 0xbfe408e8 "", length = 0, spaceAvl = 200,
      staticSpace = "\000arf.tbc\000���\224\202\004\b\001\000\000\000��������\234\t俸\t��e���\224\202\0---Type <return> to continue, or q <return> to quit---
    04\b\234\t��\\���\001\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\f\v���\223\000\000\000\000\000\000\000\000\000\000�\t��8\n���\t�������\203\004\bP*�\000\f���", '\0' <repeats 12 times>, "\001\000\000\000F\b\000\0008\v���\a��-\204\004\b\234�ͷ�\202\004\b\001\000\000\000��������,\n��H\n���\235��\000\000��,\n��^2$\n����"}
    #9  0x0804868c in main (argc=134529088, argv=0x3)
        at /usr/local/src/SOURCES/tcl8.5.7/unix/../unix/tclAppInit.c:87
    No locals.
    (gdb) 
    
    # END OF REPORT
    
    
    
  2. login: "eriklns"
  3. mimetype: "text/plain"
  4. username: "eriklns"