Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: fcd4c610d16fb5d754e85d9413920040caebe2d21f5d7a7ca505e7edda135b61
Ticket: 4f6a1ebd64cffa3ef795d83cb15d92c40cfb12bd
ensemble: segmentation fault when -subcommand and -map values are the same object
User & Date: pooryorick on 2017-11-25 15:41:13
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    The following example causes a segmentation fault:
    
    <code><verbatim>
    namespace eval n {namespace ensemble create}
    dict set list one ::two
    namespace ensemble configure n -subcommands $list -map $list
    n one
    </verbatim></code>
    
    The problem is that <code>tclEnsemble.c/BuildEnsembleConfig</code>
    [https://core.tcl.tk/tcl/artifact?ln=2536-2537&name=9cf6780328312995|gets
    hold of a List internal representation] of
    <code>ensemblePtr->subcommandList</code>, but then
    [https://core.tcl.tk/tcl/artifact?ln=2556-2557&name=9cf6780328312995|converts
    the internal representation] of <code>ensemblePtr->subcommandList</code> to a
    dictionary.  If it so happens that <code>ensemblePtr->subcommandList</code> and
    <code>ensemblePtr->subcommandDict</code> are the same Tcl_Obj, the
    storage for the List internal representation is deallocated.
    
    A similar issue is [1670091].
    
  5. foundin changed to: "trunk"
  6. is_private changed to: "0"
  7. login: "pooryorick"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "e476148cded301ffff84bcdc432536dc0c949e88"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "pooryorick"
  14. subsystem changed to: "21. [namespace]"
  15. title changed to:
    ensemble: segmentation fault when  -subcommand and -map values are the same object
    
  16. type changed to: "Bug"