Skip to content
Tcl Source Code History Of Ticket 218820
Login

History Of Ticket 218820

Artifacts Associated With Ticket 218820

  1. Ticket change [ee15399dee] (rid 104022) by nobody on 2000-10-26 01:05:57:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 2243 Bug
      Version: 8.1.1
      SubmitDate: '1999-06-16'
      LastModified: '1999-07-01'
      Severity: MED
      Status: Released
      Submitter: techsupp
      ChangedBy: foster
      OS: Other
      OSVersion: WinNT, AIX, Solaris, Linux
      Machine: NA
      FixedDate: '1999-06-16'
      FixedInVersion: 8.2b1
      ClosedDate: '2000-10-25'
      
      
      Name:
      
      Borivoj Tydlitat
      
      
      
      CustomShell:
      
      No
      
      
      
      ReproducibleScript:
      
      We observed the behavior in a fairly complex script only and were not
      
          able to reproduce it in a short one due to nature of the problem. This
      
          the relevant fragment:
      
          
      
          set drat [lindex $seg 0]
      
          if {[info exists drat]} {
      
          puts "should print drat because it exists"
      
              puts "after, drat=$drat"
      
          } else {
      
             puts "really bad, drat doesn't exist"
      
          }
      
          
      
          Output:
      
          should print drat because it exists
      
          can't read "": no such variable
      
          
      
          Our analysis:
      
          If INSTR_LOAD_SCALAR1 bytecode is generated with argument byte > 0x7F,
      
          the interpreter treats this argument as signed value, resulting in
      
          negative
      
          localIndex passed to TclGetIndexedScalar, which fails or returns invalid
      
          pointer.
      
      
      
      ObservedBehavior:
      
      Local variable seems not to exist, though it was created. 
      
          Occurs in a complex script only.
      
      
      
      Patch:
      
      *** tclExecute.old      Wed Jun 16 14:34:27 1999
      
      --- tclExecute.c        Wed Jun 16 13:55:49 1999
      
      ***************
      
      *** 1052,1058 ****
      
      
      
              case INST_LOAD_SCALAR1:
      
        #ifdef TCL_COMPILE_DEBUG
      
      !           opnd = TclGetInt1AtPtr(pc+1);
      
                  DECACHE_STACK_INFO();
      
                  valuePtr = TclGetIndexedScalar(interp, opnd,
      
                          /*leaveErrorMsg*/ 1);
      
      --- 1052,1058 ----
      
      
      
              case INST_LOAD_SCALAR1:
      
        #ifdef TCL_COMPILE_DEBUG
      
      !           opnd = TclGetUInt1AtPtr(pc+1);
      
                  DECACHE_STACK_INFO();
      
                  valuePtr = TclGetIndexedScalar(interp, opnd,
      
                          /*leaveErrorMsg*/ 1);
      
      ***************
      
      *** 1067,1073 ****
      
                  TRACE_WITH_OBJ(("%u => ", opnd), valuePtr);
      
        #else /* TCL_COMPILE_DEBUG */
      
                  DECACHE_STACK_INFO();
      
      !           valuePtr = TclGetIndexedScalar(interp, TclGetInt1AtPtr(pc+1),
      
                          /*leaveErrorMsg*/ 1);
      
                  CACHE_STACK_INFO();
      
                  if (valuePtr == NULL) {
      
      --- 1067,1073 ----
      
                  TRACE_WITH_OBJ(("%u => ", opnd), valuePtr);
      
        #else /* TCL_COMPILE_DEBUG */
      
                  DECACHE_STACK_INFO();
      
      !           valuePtr = TclGetIndexedScalar(interp, TclGetUInt1AtPtr(pc+1),
      
                          /*leaveErrorMsg*/ 1);
      
                  CACHE_STACK_INFO();
      
                  if (valuePtr == NULL) {
      
      
      
      PatchFiles:
      
      tclExecute.c
      
      
      
      
      
      06/16/1999 14:39 - stanton - I have applied the patch and added a test case.
      
    4. foundin initialized to: "final: 8.1.1"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "69. Other"
    10. title initialized to: "failure accessing local variables"
    11. type initialized to: "Bug"
  2. Ticket change [8cceb11136] (rid 127798) by welch on 2000-10-26 08:29:17:

    1. closedate changed to: "2000-10-26T01:29:17"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [0c24df6552] (rid 114127) by dgp on 2001-04-23 02:53:14:

    1. closedate changed to: "2001-04-22T19:53:14"
    2. closer changed to: "dgp"
    3. subsystem changed to: "47. Bytecode Compiler"