Skip to content
Tcl Source Code History Of Ticket 217788
Login

History Of Ticket 217788

Artifacts Associated With Ticket 217788

  1. Ticket change [95cab08b06] (rid 106214) by nobody on 2000-10-26 00:43:40:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 861 Bug
      Version: 8.1a2
      SubmitDate: '1998-11-25'
      LastModified: '1998-12-08'
      Severity: SER
      Status: Closed
      Submitter: pat
      ChangedBy: stanton
      RelatedBugIDs: 786
      OS: All
      OSVersion: NA
      Machine: NA
      FixedDate: '2000-10-25'
      FixedInVersion: NA
      ClosedDate: '1998-12-08'
      
      
      Date: Mon, 2 Nov 1998 11:59:45 -0800 (PST)
      To: [email protected]
      Cc: [email protected]
      Subject: TclEvalObj does not work
      From: [email protected]
      
      Tcl 8.1a2 Bug
      
      email:  [email protected]
      Support:  None
      Severity:  2
      OperatingSystem:  Other
      OperatingSystemVersion:  SCO Unix, AIX
      CustomShell:  None
      Synopsis:  TclEvalObj does not work
      
      ReproducibleScript:
      #include <stdio.h>
      #include <stdlib.h>
      #include <string.h>
      #include <tcl.h>
      
      #define STRING1 "puts \"hello there\"; set a \"hi\"; set b \"there\"; set c \"$a
       $b\" "
      
      void main(void)
      {
      Tcl_Obj *ftn1;
      Tcl_Interp *Interp;   // main command interp
      
          if ( (Interp=Tcl_CreateInterp()) == NULL)
            {
            fprintf(stderr,"Tcl_CreateInterp failed\n");
            }
      
          if ( (ftn1=Tcl_NewStringObj(STRING1,strlen(STRING1))) == NULL)
            fprintf(stderr,"Tcl_NewStringObj failed");
      
          if (Tcl_EvalObj(Interp,ftn1,0) != TCL_OK)
            {
            fprintf(stderr, "code block failed\n");
            }
          printf("Result [%s]\n",Tcl_GetStringFromObj(Tcl_GetObjResult(Interp),NULL));
          if (Tcl_EvalObj(Interp,ftn1,0) != TCL_OK)
            {
            fprintf(stderr, "code block failed\n");
            }
          printf("Result [%s]\n",Tcl_GetStringFromObj(Tcl_GetObjResult(Interp),NULL));
          if (Tcl_EvalObj(Interp,ftn1,0) != TCL_OK)
            {
            fprintf(stderr, "code block failed\n");
            }
          printf("Result[%s]\n", Tcl_GetStringFromObj(Tcl_GetObjResult(Interp),NULL));
      }
      
      ObservedBehavior:
      The TclEvalObj only executes the TclObject once,
      Subsequent TclEvalObj executions fail on that TclObject.
      If there are many TclEvalObj on multiple TclObject executing
      multiple times, the programs usually crashes.
      This code runs fine and is very stable in Tcl 8.0.3
      
      DesiredBehavior:
      The TclObject from what I understand is supposed to
      store a byte code representation of the ASCII commands
      after the first execution of the command.  Subsequent execution
      should be significantly faster when using the byte code.
      The work around is to use TclEval instead of TclEvalObj which
      slows down the performance significantly.
      
      
      
      
      
    4. foundin initialized to: "obsolete: 8.1a2"
    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: "10. Objects"
    10. title initialized to: "TclEvalObj does not work"
    11. type initialized to: "Bug"
  2. Ticket change [e8531f83c1] (rid 104627) by welch on 2000-10-26 07:49:18:

    1. closedate changed to: "2000-10-26T00:49:18"
    2. closer changed to: "welch"
    3. priority changed to: "1 Zero"
    4. resolution changed to: "Duplicate"
    5. status changed to: "Closed"