Overview
| Artifact ID: | 179d8e33ae3039bb676053d84ed0c6080e243e3a3f1f83aa8606511322c6d890 |
|---|---|
| Ticket: | ccc448a6bfd59cbdb2bd5cfd3392e386994883aa
namespace ensemble subcommand name prefix matching and a subsequent error results in a segmentation fault |
| User & Date: | pooryorick on 2021-09-01 21:32:18 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
When passed as a file to tclsh, the following script, with <code>eva</code> missing the final <code>l</code>, results in a segmentation fault: <code><verbatim> namespace eva n1 {error hello} </verbatim></code> An alternate script that produces the same result is: <code><verbatim> namespace eval n1 { namespace ensemble create namespace export * proc p1 args {error hello} } namespace eva n1 {::n1 p1} </verbatim></code> The reason is that <code>TclSpellFix</code> sets <code>NULL</code> as the first object pointer in <code>iPtr->ensembleRewrite.sourceObjs</code> and then later, in <code>NRNamespaceEvalCmd</code>, <code>TclFetchEnsembleRoot</code> copies a pointer to this array into <code>framePtr->objv</code>. Next, when an error occurs, <code>TclLogCommandInfo</code> accesses this array and trips on the <code>NULL</code>, causing the segmentation fault. - is_private changed to: "0"
- login: "pooryorick"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "pooryorick"
- subsystem changed to: "21. [namespace]"
- title changed to:
namespace ensemble subcommand name prefix matching and a subsequent error results in a segmentation fault
- type changed to: "Bug"