Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3efddd3bb8917e725f799cb638e6450b7485aefd
Ticket: 3037525fffffffffffffffffffffffffffffffff
crash when freeing locals hashtable
User & Date: msofer on 2010-07-31 13:39:22
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The one-liner
      proc foo {} { [catch {upvar 0 dummy \$index}] } ; foo
    accesses freed memory and causes a crash (in non-threaded tcl, threaded seems to survive due to allocator differences).
    
    Valgrind shows that a freed hash entry is being accessed, in order to free it again. The problem seems to depend on the order in which TclDeleteVars traverses the hashtable of locals.
    
    Note that this likely impacts 8.6 too (unverified as of yet, time is so short and this netbook so slow).
    
  4. foundin changed to: "obsolete: 8.5.8"
  5. is_private changed to: "0"
  6. priority changed to: "9 Immediate"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "msofer"
  10. subsystem changed to: "07. Variables"
  11. title changed to: "crash when freeing locals hashtable"
  12. type changed to: "Bug"