Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: feb23653453ed4ac9f4245fb35f0f12d45b275a4
Ticket: 845412ffffffffffffffffffffffffffffffffff
tclCompile.c crash
User & Date: vincentdarley on 2003-11-19 21:21:34
Changes

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The new {expand} code crashes when attempting to
    compile commands with > 255 arguments (or something
    like that).
    
    The offending code is this:
    
    if ((delta == 255)
    && (tokenPtr->type != TCL_TOKEN_EXPAND_WORD)) {
        /*
        /*
         * Push an empty list for expansion so our delta
         * between expanded words doesn't overflow a byte
         */
        objIndex = TclRegisterNewLiteral(envPtr, "", 0);
        TclEmitPush(objIndex, envPtr);
        Tcl_DStringAppend(&deltaList, (CONST char
    *)&delta, 1);
        delta = 1;
    
    where 'deltaList' is never initialized in this code path.  
    
    A brief look at the code shows (to me at least!) that
    there's no way that DString is ever going to be
    initialized in the non-TCL_TOKEN_EXPAND_WORD case, so
    the code appears to be obviously incorrect.
    
    If necessary I can try to create a test case, but right
    now just a big application always crashes at that line.
    
    
  4. foundin changed to: "obsolete: 8.5a0"
  5. priority changed to: "8"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "vincentdarley"
  9. subsystem changed to: "None"
  10. title changed to: "tclCompile.c crash"
  11. type changed to: "Bug"