Tcl package Thread source code

Ticket Change Details
Login
Overview

Artifact ID: 82ae3a98f92c02403f36a16a6fd66447ad3b275e23360a066b6f9325bf49d0ac
Ticket: 76f47e0376fb8b2783627799fd7f2adab66d98f9
thread::send -async script varname aborts with "alloc: invalid block"
User & Date: pooryorick 2018-07-17 06:15:10
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    With a Tcl compiled with <code>--enable-symbols</code> , the script
    
    
    <code><verbatim>
    package require Thread
    set t1 [thread::create]
    thread::send -async $t1 {lindex {}} [expr 0]
    </verbatim></code>
    
    results in:
    
    
    <code><verbatim>
    alloc: invalid block
    </verbatim></code>
    
    
    This happens because <code>threadSendFree</code>
    [https://core.tcl.tk/thread/artifact?udc=1&ln=992&name=27b80f574a4ced5a|
    obtains the length] of a <code>Tcl_Obj</code> before the string representation
    for that object is generated, and a few lines later
    [https://core.tcl.tk/thread/artifact?udc=1&ln=1014&name=27b80f574a4ced5a|the
    string representation is generated].
    
  5. foundin changed to: "trunk1"
  6. is_private changed to: "0"
  7. login: "pooryorick"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Minor"
  11. status changed to: "Open"
  12. submitter changed to: "pooryorick"
  13. subsystem changed to: "80. Thread Package"
  14. title changed to:
    thread::send -async script varname aborts with "alloc: invalid block"
    
  15. type changed to: "Bug"