Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: dc735fedd7d696da983908a151f0056ac5fc10d4
Ticket: 2782488fffffffffffffffffffffffffffffffff
tclsh8.5 segfaults upon sourcing 8.4 byte codes
User & Date: eriklns on 2009-04-27 22:14:42
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The summary line says it pretty much.
    
    The lines below provide:
    - the creation of an arbitrary byte compiled script for Tcl 8.4
    - the way tclsh 8.3 handles the version mismatch
    - the way tclsh 8.5.7 (debug version) handles the version mismatch, i.e. the segfault.
    - the full back trace of the core file (which provides remarkably few symbol info!)
    
    Sincerely,
    
    Erik.
    --
    > echo "puts BARFF" > barf.tcl
    > procomp barf.tcl
    | Tcl Dev Kit Compiler
    | Copyright (C) ActiveState Corp 2001-2002. All rights reserved.
    | Commercial license for Erik Leunissen <[email protected]>.
    > tclsh8.3 barf.tbc
    unsupported bytecode version: 2
        while executing
    "tbcload::bceval {
    TclPro ByteCode 2 0 1.4 8.4
    1 0 7 2 0 0 4 0 2 1 1 -1 -1
    7
    w0E<!)'!!
    1
    z
    1
    '!
    2
    x
    4
    DP)*F
    x
    5
    =N)T7g!
    0
    0
    }
    "
        (file "barf.tbc" line 6)
    > tclsh8.5g barf.tbc
    BARFF
    Segmentation fault (core dumped)
    > gdb tclsh8.5g 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.5g 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  0xb7e60e64 in TclCleanupByteCode () from /usr/local/lib/libtcl8.5.so
    (gdb) bt full
    #0  0xb7e60e64 in TclCleanupByteCode () from /usr/local/lib/libtcl8.5.so
    No symbol table info available.
    #1  0xb7e60f88 in FreeByteCodeInternalRep () from /usr/local/lib/libtcl8.5.so
    No symbol table info available.
    #2  0xb7ea8565 in TclFreeObj () from /usr/local/lib/libtcl8.5.so
    No symbol table info available.
    #3  0xb7c1bff5 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  0xb7e2a448 in TclEvalObjvInternal () from /usr/local/lib/libtcl8.5.so
    No symbol table info available.
    #5  0xb7e2af39 in TclEvalEx () from /usr/local/lib/libtcl8.5.so
    No symbol table info available.
    #6  0xb7e2b22e in Tcl_EvalEx () from /usr/local/lib/libtcl8.5.so
    No symbol table info available.
    #7  0xb7e97cb6 in Tcl_FSEvalFileEx () from /usr/local/lib/libtcl8.5.so
    No symbol table info available.
    #8  0xb7e9deff in Tcl_Main () from /usr/local/lib/libtcl8.5.so
    No symbol table info available.
    #9  0x0804868c in main (argc=Cannot access memory at address 0x0
    ) at /usr/local/src/SOURCES/tcl8.5.7/unix/../unix/tclAppInit.c:87
    No locals.
    (gdb)
    
    # END OF REPORT
    
    
  4. foundin changed to: "obsolete: 8.5.7"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "eriklns"
  10. subsystem changed to: "None"
  11. title changed to: "tclsh8.5 segfaults upon sourcing 8.4 byte codes"
  12. type changed to: "Bug"