Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2369e70516ea118d787f49420c09596e6fd52621d75018b71368dcc78179fe80
Ticket: db36fa5122259be74d0ccadd102e076094703052
compiled lindex botches index artihmetic
User & Date: dgp on 2018-03-01 18:24:04
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    
    % lindex {a b c} -1-1
    c
    
    Correct answer should be the empty string.
    
    The bytecode compiler for [lindex] tries to
    encode the indices "end", "end-1", .... etc.
    as the immediate bytecode arguments -2, -3, ....
    
    It ignores the possibility that TclGetIntForIndex()
    can return those values as legit index values
    resulting from index arithmetic.  In this example
    the index "-2" is getting interpreted as if it were "end".
    
  5. foundin changed to: "8.6"
  6. is_private changed to: "0"
  7. login: "dgp"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Severe"
  11. status changed to: "Open"
  12. submitter changed to: "dgp"
  13. subsystem changed to: "47. Bytecode Compiler"
  14. title changed to: "compiled lindex botches index artihmetic"
  15. type changed to: "Bug"