Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: db497c896a65b71ba94ccdc9e68837123298ddc9
Ticket: 804681ffffffffffffffffffffffffffffffffff
traces on errorInfo/errorCode corrupt the evaluation stack
User & Date: msofer on 2003-09-15 15:18:45
Changes

  1. icomment:
    Logged In: YES 
    user_id=148712
    
    Pre-modif TEBC had the bug too, but it was more difficult to
    trigger. Witness
    
    mig@cx:/CVS/tcl8.3.4/unix$ ./tclsh
    % info patch
    8.3.4
    % proc show args {puts $args}
    % trace variable errorInfo wu show
    % expr {1+9/0}
    errorInfo {} w
    errorInfo {} w
    divide by zero
    % exit
    Segmentation fault
    
    Before those modifs, an instruction that caused an error
    removed its arguments from the stack before "goto
    checkForCatch", so that the corruption only happened when
    there were objects in the stack deeper than them - in the
    example, the "1" is in the stack when the division error
    occurs, so that removing the "9" and "0" is not quite enough.
    Now the stack is not cleared before "goto checkForCatch", so
    that the stack is always corrupted if error logging causes
    TEBC to be called.
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"