Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c2eb33fdc606a97ce4a1fd152bf924a8a5fe7e28403ee8d90784e01cf79dcf76
Ticket: 775ee885603d3d09b5984b1579630e9786f78928
upvar (used with wrong level) causes a segfault
User & Date: sebres on 2019-09-06 13:33:22
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    Folowing code executed at top-level would segfault in 8.7 (and trunk):
    <pre>
        upvar error error; lappend error BOOM
    </pre>
    Initially found (mistakenly) trying to check an idea in trace:
    <pre>
        trace add variable r read {upvar error error; lappend error BOOM}
        set r
    </pre>
    or here (test executed in top-level, so it is bad level too):
    <pre>
        proc test {} {uplevel {upvar error error; lappend error BOOM}}
        test
    </pre>
    Also following error is a bit unexpected:
    <pre>
        % uplevel {lappend error BOOM}; # expecting bad level "1"
        bad level "lappend error BOOM"
    </pre>
    Tcl 8.6 seems to be not affected by both.
    
  5. foundin changed to: ">=8.7"
  6. is_private changed to: "0"
  7. login: "sebres"
  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: "sebres"
  13. subsystem changed to: "07. Variables"
  14. title changed to: "upvar (used with wrong level) causes a segfault"
  15. type changed to: "Bug"