Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a5ca17c1f819f618625e317adcee7b9311aa492a
Ticket: 218903ffffffffffffffffffffffffffffffffff
array set in undefined namespace crashes tclsh
User & Date: nobody on 2000-10-26 01:07:26
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2613 Bug
    Version: 8.0.5
    SubmitDate: '1999-08-31'
    LastModified: '1999-09-18'
    Severity: MED
    Status: Released
    Submitter: techsupp
    ChangedBy: hobbs
    OS: Windows NT
    OSVersion: 4.0
    Machine: X86
    FixedDate: '1999-09-18'
    FixedInVersion: 8.2.1
    ClosedDate: '2000-10-25'
    
    
    Name:
    
    Nick Bender
    
    
    
    CustomShell:
    
    None.
    
    
    
    Comments:
    
    Haven't checked later versions...
    
    
    
    ReproducibleScript:
    
    Run the following in tclsh:
    
        
    
        % array set nospace::new {}
    
        
    
        ...crash...
    
    
    
    ObservedBehavior:
    
    Crashes with null pointer in line 3177 of generic/tclVar.c
    
    
    
    DesiredBehavior:
    
    % array set nospace::new {}
    
        can't set "nospace::new": parent namespace doesn't exist
    
        %
    
    
    
    Patch:
    
    *** tclVar.c.oldFri Aug 20 16:59:27 1999
    
    --- tclVar.c.newFri Aug 20 16:58:42 1999
    
    ***************
    
    *** 3170,3179 ****
    
       * Create variable for new array.
    
       */
    
      
    
    ! varPtr = TclLookupVar(interp, varName, (char *) NULL, 0, 0,
    
      /*createPart1*/ 1, /*createPart2*/ 0,
    
      &arrayPtr);
    
          }
    
          TclSetVarArray(varPtr);
    
          TclClearVarUndefined(varPtr);
    
          varPtr->value.tablePtr =
    
    --- 3170,3184 ----
    
       * Create variable for new array.
    
       */
    
      
    
    ! varPtr = TclLookupVar(interp, varName, (char *) NULL,
    
    ! TCL_LEAVE_ERR_MSG, "set",
    
      /*createPart1*/ 1, /*createPart2*/ 0,
    
      &arrayPtr);
    
    + if (varPtr == NULL) {
    
    +   return TCL_ERROR;
    
    + }
    
          }
    
    + 
    
          TclSetVarArray(varPtr);
    
          TclClearVarUndefined(varPtr);
    
          varPtr->value.tablePtr =
    
    
    
    PatchFiles:
    
    generic/tclVar.c
    
    
    
    
    
    Verified in 8.2 
    -- 08/31/1999 hobbs
    The above patch was not exactly correct.  A correct version
    has been applied for 8.2.1. 
    -- 09/18/1999 hobbs
    
  4. foundin changed to: "final: 8.0.5"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "array set in undefined namespace crashes tclsh"
  11. type changed to: "Bug"