Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: cb1bcfe770bb3839be5e1cdcd91c53c75d753f77
Ticket: 2531577fffffffffffffffffffffffffffffffff
Redefining object constructor after error causes SIGSEGV
User & Date: andygoth on 2009-01-23 19:37:35
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    oo::class create foo {constructor {} {error x}}
    foo new
    oo::define foo {constructor {} {}}
    foo new
    
    The first invocation of [foo new] fails with error "x".  The second invocation of [foo new] crashes the Tcl interpreter.
    
    Observed using Pat Thoyts's tclkit-gui-86b1.exe (x86 Windows) and using a self-compiled Tcl 8.6b1 on Linux.  Here's the backtrace on the latter:
    
    #0  0x031e22e8 in ?? ()
    #1  0x00b90d44 in TclOOInvokeContext (clientData=0x998b070, interp=0x998a8e0,
        objc=2, objv=0x998b04c)
        at /home/users/td26063/build/tcl8.6b1/generic/tclOOCall.c:303
    #2  0x00b8d681 in TclNRNewObjectInstance (interp=0x998a8e0, cls=0x99c6728,
        nameStr=0x0, nsNameStr=0x0, objc=2, objv=0x998b04c, skip=2,
        objectPtr=0x99bd1c4)
        at /home/users/td26063/build/tcl8.6b1/generic/tclOO.c:1394
    #3  0x00b8f346 in TclOO_Class_New (clientData=0x0, interp=0x998a8e0,
        context=0x998b058, objc=2, objv=0x998b04c)
        at /home/users/td26063/build/tcl8.6b1/generic/tclOOBasic.c:238
    #4  0x00b90d44 in TclOOInvokeContext (clientData=0x998b058, interp=0x998a8e0,
        objc=2, objv=0x998b04c)
        at /home/users/td26063/build/tcl8.6b1/generic/tclOOCall.c:303
    #5  0x00b8e86f in TclOOObjectCmdCore (oPtr=0x99c6540, interp=0x998a8e0,
        objc=2, objv=0x998b04c, flags=1, startCls=0x0)
        at /home/users/td26063/build/tcl8.6b1/generic/tclOO.c:2110
    #6  0x00b8e4c7 in PublicNRObjectCmd (clientData=0x99c6540, interp=0x998a8e0,
        objc=2, objv=0x998b04c)
        at /home/users/td26063/build/tcl8.6b1/generic/tclOO.c:1951
    #7  0x00ab0f8c in NRRunObjProc (data=0x99adbcc, interp=0x998a8e0, result=0)
        at /home/users/td26063/build/tcl8.6b1/generic/tclBasic.c:4303
    #8  0x00ab0d7d in TclNRRunCallbacks (interp=0x998a8e0, result=0,
        rootPtr=0x999b680, tebcCall=1)
        at /home/users/td26063/build/tcl8.6b1/generic/tclBasic.c:4241
    #9  0x00b08b76 in TclExecuteByteCode (interp=0x998a8e0, codePtr=0x99c6bd0)
        at /home/users/td26063/build/tcl8.6b1/generic/tclExecute.c:2813
    #10 0x00ab1020 in NRCallTEBC (data=0x99a9484, interp=0x998a8e0, result=0)
        at /home/users/td26063/build/tcl8.6b1/generic/tclBasic.c:4325
    #11 0x00ab0d7d in TclNRRunCallbacks (interp=0x998a8e0, result=0, rootPtr=0x0,
        tebcCall=0) at /home/users/td26063/build/tcl8.6b1/generic/tclBasic.c:4241
    #12 0x00ab2c9f in TclEvalObjEx (interp=0x998a8e0, objPtr=0x999e548,
        flags=131072, invoker=0x0, word=0)
        at /home/users/td26063/build/tcl8.6b1/generic/tclBasic.c:5717
    #13 0x00ab2c40 in Tcl_EvalObjEx (interp=0x998a8e0, objPtr=0x31e22e8,
        flags=131072) at /home/users/td26063/build/tcl8.6b1/generic/tclBasic.c:5698
    #14 0x00b1dcb7 in Tcl_RecordAndEvalObj (interp=0x998a8e0, cmdPtr=0x99adc58,
        flags=131072)
        at /home/users/td26063/build/tcl8.6b1/generic/tclHistory.c:161
    #15 0x00b429ae in Tcl_Main (argc=-1, argv=0xbfe56b38,
        appInitProc=0x804868b <Tcl_AppInit>)
        at /home/users/td26063/build/tcl8.6b1/generic/tclMain.c:468
    #16 0x0804867e in main (argc=1, argv=0xbfe56b34)
        at /home/users/td26063/build/tcl8.6b1/unix/tclAppInit.c:87
    
  4. foundin changed to: "obsolete: 8.6b1"
  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: "andygoth"
  10. subsystem changed to: "35. TclOO Package"
  11. title changed to: "Redefining "
  12. type changed to: "Bug"