Skip to content
Tcl Source Code History Of Ticket 550142ffffffffff
Login

History Of Ticket 550142ffffffffff

Artifacts Associated With Ticket 550142ffffffffff

  1. Ticket change [38544d245b] (rid 112193) by chrishall on 2002-04-29 12:57:41:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Calling Tcl_Expr... with an invalid expression causes
      the following error:
      
         Tcl_AppendStringsToObj called with shared object
         Abort (core dumped)
       
      when there is already a shared result object in the
      interpreter's result object.
      
      The program below reproduces the fault:
      
      ----- CUT HERE -----
      #include <tcl.h>
      
      char* expr = "$A == B";
      
      main(int argc, char** argv)
      {
      int ret;
      Tcl_Interp* interp = Tcl_CreateInterp();
      Tcl_Obj* obj;
      
      obj = Tcl_NewStringObj("Hello", -1);
      
      Tcl_IncrRefCount(obj);
      
      Tcl_SetObjResult(interp, obj);
      
      Tcl_ExprBoolean(interp, expr, &ret);
      }
      ----- CUT HERE -----
      
      Superficially, this seems similar to bug #456892 which
      I submitted last year.
      
      The problem exists in 8.3.4 and 8.4a4 (both built from
      source, today, on Solaris 7).
      
    4. foundin initialized to: "obsolete: 8.4a4"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "chrishall"
    9. subsystem initialized to: "45. Parsing and Eval"
    10. title initialized to: "Tcl_ExprObj -> abort"
    11. type initialized to: "Bug"
  2. Ticket change [dc451369d8] (rid 108108) by msofer on 2002-04-29 23:27:42:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Yes, I do think it is a new symptom of the same "disease"
      described in bugs #456892 and #533364. Raising the priority.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. priority changed to: "8"
    5. username: "msofer"
  3. Ticket change [e2351b7d68] (rid 87581) by jenglish on 2002-06-22 04:17:54:

    1. closedate changed to: "2002-06-21T21:17:54"
    2. closer changed to: "jenglish"
    3. icomment:
      Logged In: YES 
      user_id=68433
      
      Fixed now.
      
      The culprit here is LogSyntaxError(), which was calling:
      Tcl_AppendStringsToObj(Tcl_GetObjResult(infoPtr->parsePtr->interp),
      ...),
      without first checking to ensure that the object result is
      not shared.
      
      Actually, since LogSyntaxError is an "error originator", it
      should be overwriting the result instead of appending to
      it.  Fix: added a call to Tcl_ResetResult() (tclParseExpr.c,
      identical fix in tclCompExpr.c).
      
      NOTE: there are several other places in the core where  the
      idiom Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), ...)
      appears; these should either be replaced with
      Tcl_AppendResult(infoPtr->parsePtr->interp, ...),  or
      preceded by Tcl_ResetResult() as appropriate. 
      
      
      
    4. login: "jenglish"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "jenglish"