Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9a03f2d282055a90210edf278c5fdd6be3be48d32f9b7e9fbc70f4f5a37ca0f2
Ticket: 31fd84270644f67d4ad8d762293be12439ba237c
Interim increment of iPtr->compileEpoch causes reset of line-number
User & Date: sebres on 2024-05-13 13:09:34
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    Continuation of [9889f96f4da77e3b].
    
    An increment of compile-epoch and following [./file?ci=core-8-branch&name=generic/tclExecute.c&ln=8043-8069|switch to direct eval] causes that tcl starts to evaluate rest of the script from scratch without to consider that this is a continuation of script (line 3 in followed example) for whatever reason...
    
    Here is a test case illustrating the behaviour:
    <pre><code>set c {
      puts ===[incr ::cntr]===; if {$::cntr == 1} {puts **BUMP**; testbumpinterpepoch};
      if 1 {
        puts [info frame 0]
      }
    }
    time $c 2
    </code></pre>
    
    The result:
    <pre><code>===1===
    **BUMP**
    type eval line 2 cmd {info frame 0} level 0
    ===2===
    type eval line 4 cmd {info frame 0} level 0
    </code></pre>
    
    How one can see epoch bump causes a reset of the line-number.
    
    How to reproduce it simply:
    <pre><code>./tcltest <<< 'set c [subst -nocommands -novariables {puts ===[incr ::cntr]===; if {$::cntr == 1} {puts **BUMP**; testbumpinterpepoch};\n\nif 1 {\nputs [info frame 0]\n}}]; puts $c; time $c 2'
    </code></pre>
    
  5. foundin changed to: "8.6+"
  6. is_private changed to: "0"
  7. login: "sebres"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "50e9528765c18296566374b3fde2df942c394efd"
  10. resolution changed to: "None"
  11. severity changed to: "Severe"
  12. status changed to: "Open"
  13. submitter changed to: "sebres"
  14. subsystem changed to: "47. Bytecode Compiler"
  15. title changed to:
    Interim increment of iPtr->compileEpoch causes reset of line-number
    
  16. type changed to: "Bug"