Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ca867048e791b45284696f28f1e2c8a1a0c8227d7524037ed9a2bc9d88493a03
Ticket: 7842f33a5cc5eed080a57f8af9ac1e7e3cee444a
TCL crash (core)
User & Date: chrstphrchvz on 2023-10-22 16:41:58
Changes

  1. icomment:
    The reporter’s example still crashes for core-8-6-branch. UBSan (<tt>-fsanitize=null</tt>) and ASan (<tt>-fsanitize=address</tt>) errors:
    
    <blockquote><pre>
    <span style="font-weight:bold">tcl/generic/tclOOCall.c:1024:25: <span style="color:firebrick">runtime error:</span> member access within null pointer of type 'struct Class'</span>
    SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tcl/generic/tclOOCall.c:1024:25 in 
    AddressSanitizer:DEADLYSIGNAL
    =================================================================
    <span style="font-weight:bold;color:firebrick">==65360==ERROR: AddressSanitizer: SEGV on unknown address 0x0000000000f0 (pc 0x0001109f36a5 bp 0x7ff7b1f52830 sp 0x7ff7b1f51c80 T0)</span>
    ==65360==The signal is caused by a READ memory access.
    ==65360==Hint: address points to the zero page.
        #0 0x1109f36a5 in TclOOGetCallContext tclOOCall.c:1024
        #1 0x1109be8b2 in TclOOObjectCmdCore tclOO.c:2599
        #2 0x1109cd36d in PublicNRObjectCmd tclOO.c:2461
        #3 0x10fa83837 in Dispatch tclBasic.c:4520
        #4 0x10fa63bbf in TclNRRunCallbacks tclBasic.c:4556
        #5 0x10fa52ad3 in Tcl_NRCallObjProc tclBasic.c:8269
        #6 0x1109c8db5 in ObjectNamespaceDeleted tclOO.c:1141
        #7 0x1106b22dd in Tcl_DeleteNamespace tclNamesp.c:917
        #8 0x1109cd534 in ObjectRenamedTrace tclOO.c:844
        #9 0x10fa57e58 in CallCommandTraces tclBasic.c:3426
        #10 0x10fa4d7e7 in Tcl_DeleteCommandFromToken tclBasic.c:3226
        #11 0x1106ba16e in TclTeardownNamespace tclNamesp.c:1124
        #12 0x1106b3857 in Tcl_DeleteNamespace tclNamesp.c:1011
        #13 0x1109cd534 in ObjectRenamedTrace tclOO.c:844
        #14 0x10fa57e58 in CallCommandTraces tclBasic.c:3426
        #15 0x10fa4d7e7 in Tcl_DeleteCommandFromToken tclBasic.c:3226
        #16 0x1109d4b98 in TclOO_Object_Destroy tclOOBasic.c:361
        #17 0x1109eb8c0 in TclOOInvokeContext tclOOCall.c:314
        #18 0x1109c0400 in TclOOObjectCmdCore tclOO.c:2645
        #19 0x1109cd36d in PublicNRObjectCmd tclOO.c:2461
        #20 0x10fa83837 in Dispatch tclBasic.c:4520
        #21 0x10fa63bbf in TclNRRunCallbacks tclBasic.c:4556
        #22 0x10fa76fdf in TclEvalObjEx tclBasic.c:6138
        #23 0x10fa5f951 in Tcl_EvalObjEx tclBasic.c:6119
        #24 0x110510fa2 in Tcl_RecordAndEvalObj tclHistory.c:191
        #25 0x1106ab031 in Tcl_MainEx tclMain.c:520
        #26 0x10dfab8d6 in main tclAppInit.c:91
        #27 0x11a14552d in start+0x1cd (dyld:x86_64+0x552d)
    
    ==65360==Register values:
    rax = 0x00000000000000f0  rbx = 0x00007ff7b1f51d80  rcx = 0x0000100000000000  rdx = 0x0000000000000000  
    rdi = 0x00007ff7b1f50f70  rsi = 0x0000000000000000  rbp = 0x00007ff7b1f52830  rsp = 0x00007ff7b1f51c80  
     r8 = 0x0000000000000057   r9 = 0xbfffff00000fffff  r10 = 0x00007ff809a2059e  r11 = 0x0000000000000202  
    r12 = 0x000000011a1c03a0  r13 = 0x00007ff7b1f57a58  r14 = 0x000000010dfab898  r15 = 0x000000011a1ac010  
    AddressSanitizer can not provide additional info.
    SUMMARY: AddressSanitizer: SEGV tclOOCall.c:1024 in TclOOGetCallContext
    ==65360==ABORTING
    </pre></blockquote>
    A <tt>NULL+0xf0</tt> dereference at tclOOCall.c:1024 would mean that <tt>oPtr-&gt;selfCls</tt> is <tt>NULL</tt>.
    
  2. login: "chrstphrchvz"
  3. mimetype: "text/x-fossil-wiki"