| Ticket UUID: | 0de6c1d79cfba2ea1b21a6732cd9a6e1e1201563 | ||
| Title: | [child invokehidden info frame] dereferences NULL | ||
| Type: | Bug | Created on: | 2024-03-19 02:56:44 |
| Submitter: | andy | Assigned to: | nobody |
| Subsystem: | 17. Commands I-L | Severity: | Minor |
| Priority: | 5 Medium | Last modified: | 2024-07-02 13:39:12 |
| Status: | Closed | Closed by: | apnadkarni |
| Resolution: | Fixed | Closed on: | 2024-07-02 13:39:12 |
| Version: | 8.6.13 | ||
| Description: | ||||
|
The following crashes Tcl:
This dies in tclCmdIL.c line 1163 because Replacing " Backtrace:
| ||||
| User Comments: | ||||
apnadkarni added on 2024-05-08 13:58:26:
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. apnadkarni added on 2024-07-02 11:37:05:
Closing as crash is fixed in [7077dea20e]. A follow-on bug remains - logged as [708b005695]. apnadkarni added on 2024-07-02 13:39:12:
@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
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. | ||||
