Skip to content
Tcl Source Code History Of Ticket 0de6c1d79c
Login

History Of Ticket 0de6c1d79c

Artifacts Associated With Ticket 0de6c1d79c

  1. Ticket change [294339331a] (rid 223252) by andy on 2024-03-19 02:56:44:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. comment initialized to:
      The following crashes Tcl:
      
          interp create child
          child hide info
          child invokehidden info frame
      
      This dies in tclCmdIL.c line 1163 because `*cmdFramePtrPtr` is NULL, since `iPtr->cmdFramePtr` is NULL.
      
      Replacing "`info frame`" with "`info level`" returns 0, no crash.
      
      Backtrace:
      
      ```
      #0  InfoFrameCmd (dummy=0x0, interp=0xc5a640, objc=1, objv=0xc6f720)
          at /root/tclkit-dbg/tcl/build/unix/tclCmdIL.c:1163
      #1  0x00000000005ca355 in Dispatch (data=0xc43498, interp=0xc5a640, result=0)
          at /root/tclkit-dbg/tcl/build/unix/tclBasic.c:4467
      #2  0x00000000005ca3db in TclNRRunCallbacks (interp=0xc5a640, result=0,
          rootPtr=0x0) at /root/tclkit-dbg/tcl/build/unix/tclBasic.c:4503
      #3  0x00000000006c7095 in NRPostInvokeHidden (data=0xcad058, interp=0xae4f40,
          result=0) at /root/tclkit-dbg/tcl/build/unix/tclInterp.c:3091
      #4  0x00000000005ca3db in TclNRRunCallbacks (interp=0xae4f40, result=0,
          rootPtr=0x0) at /root/tclkit-dbg/tcl/build/unix/tclBasic.c:4503
      #5  0x00000000005ccda9 in TclEvalObjEx (interp=0xae4f40, objPtr=0xca0500,
          flags=131072, invoker=0x0, word=0)
          at /root/tclkit-dbg/tcl/build/unix/tclBasic.c:6068
      #6  0x00000000005ccd3d in Tcl_EvalObjEx (interp=0xae4f40, objPtr=0xca0500,
          flags=131072) at /root/tclkit-dbg/tcl/build/unix/tclBasic.c:6049
      #7  0x00000000006c0131 in Tcl_RecordAndEvalObj (interp=0xae4f40,
          cmdPtr=0xca0500, flags=131072)
          at /root/tclkit-dbg/tcl/build/unix/tclHistory.c:190
      #8  0x00000000006f0bfa in Tcl_MainEx (argc=-1, argv=0x7fffffffdb20,
          appInitProc=0x429e16 <TclKit_AppInit>, interp=0xae4f40)
          at /root/tclkit-dbg/tcl/build/unix/tclMain.c:520
      #9  0x0000000000429ffe in main (argc=1, argv=0x7fffffffdb18) at main.c:7
      ```
      
    5. foundin initialized to: "8.6.13"
    6. is_private initialized to: "0"
    7. login: "andy"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "662c23482b0bf6a505f39e48fb7ad43af8dee4d3"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "andy"
    14. subsystem initialized to: "17. Commands I-L"
    15. title initialized to: "[child invokehidden info frame] dereferences NULL"
    16. type initialized to: "Bug"
  2. Ticket change [f5a87af841] (rid 225608) by apnadkarni on 2024-05-08 13:58:26:

    1. icomment:
      Still present in 9.0.
      
      `info frame` (TIP 280) is very particular about the presence of an appropriately filled out `CmdFrame` structure. While most of the TclEvalxxx, byte code compiler etc. were adapted with TIP 280 to do the needful, some code paths, including that of interp invokehidden were omitted. Thus the crash.
      
      Fixing `invokehidden` is non trivial (at least from my limited perspective) as with the introduction of NRE, the code path traverses through multiple layers of interp contexts, the NRE trampoline, the namespace ensemble, coroutine contexts.
      
      I've started a branch apn-info-frame to at least try and protect against a crash in some semi-sensible fashion if not give a complete frame dictionary result.
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  3. Ticket change [316306a435] (rid 228387) by apnadkarni on 2024-07-02 11:37:05:

    1. closedate changed to: "2460493.98409606"
    2. closer changed to: "apnadkarni"
    3. icomment:
      Closing as crash is fixed in [7077dea20e]. A follow-on bug remains - logged as [708b005695].
      
    4. login: "apnadkarni"
    5. mimetype: "text/x-fossil-plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
  4. Ticket change [705bba3ab4] (rid 228406) by apnadkarni on 2024-07-02 13:39:12:

    1. closedate changed to: "2460494.06889861"
    2. icomment:
      @sebres - I do not agree with your [e40407c5e8] commit to raise an error instead of returning "type=precompiled" as better for consistency. Raising an error implies the caller has passed some invalid value. That is not the case here. The fault lies in the implementation, not the caller, in not having frame information available. So it seems more reasonable to return something that says "frame information not available" as opposed to something that tells the caller they made an error. It's misleading. 
      
      Moreover, with the above commit
      
      ```
      % child invokehidden info frame
      1
      % child invokehidden info frame 0
      bad level "0"
      % child invokehidden info frame 1
      bad level "1"
      ```
      
      does not seem consistent at all. info frame returns a level but then you try to get information and it says bad level.
      
      The dummied up use of "precompiled" as stated in comments is really in place of "framinfonotavailable" because the former also has no frame info available. Adding another type would require a TIP.
      
      This is something I am not going to argue further as it is not that important to me. But if you change your mind, I'd prefer not to raise an error.
      
    3. login: "apnadkarni"
    4. mimetype: "text/x-markdown"