Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 918eb0a5b292cbab76851622ee22218447c35ab82dece19a06e3c6e9dc714c70
Ticket: 4eb3a155ac6f73f48b270a19e543841d26bf2e6f
apply causes memory corruption / crash
User & Date: apnadkarni on 2022-07-20 17:17:42
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-markdown"
  4. comment changed to:
    See the following session (Windows, released 8.6.12): 
    
    ```
    % info patch
    8.6.12
    % set b {set a 1}
    set a 1
    % apply [list {} $b]
    1
    %
    % apply [list {} $b[set b {}]
    ^C
    ```
    
    On the second apply, program either crashes or goes into never-never land.
    
    Similarly with a recent vintage core-8-branch,
    
    ```
    % info patch
    8.7a6
    % set b {set a 1}
    set a 1
    % apply [list {} $b]
    1
    % apply [list {} $b[set b {}]
    ^C
    ```
    
    On Ubuntu 20.04, for good measure
    
    ```
    apn@IO:/mnt/d/src/tcltk/core-8-branch/tcl/unix/build$ LD_LIBRARY_PATH=. ./tclsh
    % info patch
    8.7a6
    % set b {set a 1}
    set a 1
    % apply [list {} $b]
    1
    % apply [list {} $b[set b{}]
    ^C
    ```
    
    The same three commands in a script do not crash or run away, at least not immediately.
    
    A first pass through the debugger seems to indicate cause is reading from uninitialized memory. Contents at the location determine future outcomes.
    Further details to follow.
    
  5. foundin changed to: "8.6"
  6. is_private changed to: "0"
  7. login: "apnadkarni"
  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: "apnadkarni"
  13. subsystem changed to: "47. Bytecode Compiler"
  14. title changed to: "apply causes memory corruption / crash"
  15. type changed to: "Bug"