Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2969c8bab66bee43c362d8e9acc992ba128820ba253aa646d500a837bd101364
Ticket: 27b3ce299702ab9a540d16a6f0678b6cd370e5aa
Memory access violation in scripts > 2**31 bytes
User & Date: apnadkarni on 2023-04-28 16:55:57
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-markdown"
  4. comment changed to:
    Having a script longer than INT_MAX results in memory access violations even on 64-bit builds. Example is below (invalid set command is intentional)
    
    ```
    try [string cat [string repeat " " 0x80000000] "set a b c"]
    ```
    
    This is just one example but between the byte code compiler and TIP 280 source code -> source line number tracking there are many occasions for overflowing length limits. Fixing these is non trivial and risky so for the moment the plan is to disallow scripts or byte code sequences longer than INT_MAX.
    
    Marking as minor since not likely to have a such a long script. Scripts in safe interps are still a concern however so protection is still desirable.
    
  5. foundin changed to: "9.0"
  6. is_private changed to: "0"
  7. login: "apnadkarni"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "9546e9877f1a8899e25a89082561ee694e7fb402"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "apnadkarni"
  14. subsystem changed to: "- New Builtin Commands"
  15. title changed to: "Memory access violation in scripts > 2**31 bytes"
  16. type changed to: "Bug"