Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 138884f44bf463589a33bd34fed4bfeb5d679ebafe40202f9de188fd37d1e579
Ticket: 02977e0004c72049ed3324fe35f8634bfeede8e6
test oo-1.23 fails
User & Date: sebres on 2024-11-06 15:57:42
Changes

  1. icomment:
    Yep, if I switch in my branch the code to retard destroy via NRE immediately (don't bypass first 100 nested calls), I can reproduce the segfault (no idea whether it is the same or not, because compared to Donals solution my branch also does it for classes, not for objects only, so it can be an after-effect of that).
    
    The call stack looks like this:
    <code><pre style="padding-left:20pt; max-width:95vw !important; overflow-x:auto;">
    Thread 1 received signal SIGSEGV, Segmentation fault.
    Tcl_DeleteCommandFromToken (interp=0x320dbd0, cmd=0x32d4500) at generic/tclBasic.c:3203
    3203        cmdPtr->nsPtr->refCount++;
    (gdb) where
    #0  Tcl_DeleteCommandFromToken (interp=0x320dbd0, cmd=0x32d4500) at generic/tclBasic.c:3203
    #1  0x00007ffd515fcaad in TclOODeleteDescendants (interp=0x320dbd0, oPtr=0x32bcf70) at generic/tclOO.c:953
    #2  0x00007ffd515fd26d in ObjectNamespaceDeleted (clientData=0x32bcf70) at generic/tclOO.c:1168
    #3  0x00007ffd515f4841 in Tcl_DeleteNamespace (namespacePtr=0x32bd080) at generic/tclNamesp.c:918
    #4  0x00007ffd515f4ed6 in TclTeardownNamespace (nsPtr=0x32b9370) at generic/tclNamesp.c:1196
    #5  0x00007ffd515f4a47 in Tcl_DeleteNamespace (namespacePtr=0x32b9370) at generic/tclNamesp.c:1012
    #6  0x00007ffd515f4ed6 in TclTeardownNamespace (nsPtr=0x2b08070) at generic/tclNamesp.c:1196
    #7  0x00007ffd514cb700 in DeleteInterpProc (blockPtr=0x320dbd0 " Y \003") at generic/tclBasic.c:1506
    #8  0x00007ffd51626410 in Tcl_EventuallyFree (clientData=0x320dbd0, freeProc=0x7ffd514cb50d <DeleteInterpProc>) at generic/tclPreserve.c:296
    #9  0x00007ffd514cb504 in Tcl_DeleteInterp (interp=0x320dbd0) at generic/tclBasic.c:1394
    #10 0x00007ffd515c6594 in ChildObjCmdDeleteProc (clientData=0x320dbd0) at generic/tclInterp.c:2684
    #11 0x00007ffd514cddf1 in Tcl_DeleteCommandFromToken (interp=0x788260, cmd=0x32e55d0) at generic/tclBasic.c:3276
    #12 0x00007ffd515c2ee6 in NRInterpCmd (clientData=0x0, interp=0x788260, objc=3, objv=0x600e80) at generic/tclInterp.c:852
    #13 0x00007ffd514cfad0 in Dispatch (data=0x333ef68, interp=0x788260, result=0) at generic/tclBasic.c:4505
    #14 0x00007ffd514cfb65 in TclNRRunCallbacks (interp=0x788260, result=0, rootPtr=0x0) at generic/tclBasic.c:4541
    #15 0x00007ffd514cf39a in Tcl_EvalObjv (interp=0x788260, objc=5, objv=0x600390, flags=2097168) at generic/tclBasic.c:4260
    #16 0x00007ffd514d18fc in TclEvalEx (interp=0x788260, script=0x2a390c0 "# This file contains a collection of tests for Tcl's built-in object system.\n# Sourcing this file into Tcl runs the tests and generates output for errors.\n# No output means no errors were found.\n#\n# C"..., numBytes=125476, flags=0, line=54, clNextOuter=0x0, outerScript=0x2a390c0 "# This file contains a collection of tests"...) at generic/tclBasic.c:5409
    </pre></code>
    
    I guess TclOODeleteDescendants does something wrong in case if namespace get deleted, but command is still there (or maybe because the rest of namespace deletion process isn't retarded now, but the objects simply linked to the list).
    
  2. login: "sebres"
  3. mimetype: "text/x-fossil-wiki"