Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: fe7667fb57db70b460e8f6dc71a0cc67577de659
Ticket: 218661ffffffffffffffffffffffffffffffffff
Stub table registration corrupt
User & Date: nobody on 2000-10-26 01:03:49
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 1633 Bug
    Version: 8.1b2
    SubmitDate: '1999-03-25'
    LastModified: '1999-04-05'
    Severity: CRIT
    Status: Released
    Submitter: pat
    ChangedBy: redman
    OS: Linux-Red Hat
    OSVersion: 4.2
    Machine: Other
    FixedDate: '1999-04-05'
    ClosedDate: '2000-10-25'
    
    
    Name:
    
    Jan Nijtmans
    
    
    
    CVS:
    
    24/Mar/1998
    
    
    
    Extensions:
    
    Img 1.2
    
    
    
    ReproducibleScript:
    
        The first trunk in the patch below solves potential problem if
    
        Tcl_PkgProvideEx() is called after Tcl_PkgProvide()
    
        with the same package name. When used in that order, a valid
    
        stub table pointer still stays unregistered for use by
    
        other packages.
    
        
    
        More important is another problem. If I compile
    
        Tcl/Tk8.1b2 from the current CVS database, and
    
        try to load Img 1.2, I get the error-message that Tk
    
        doesn't have Stub support. The cause for this error is
    
        in tclPkg.c, where something terrible went wrong. It
    
        seems that a few lines were copied to the wrong place,
    
        currupting the Stub table registration for Tk. This
    
        makes Img 1.2 totally unusable.
    
        
    
        The patch below solves both those problems.
    
        
    
    
    
    
    
    
    
    Patch:
    
    *** generic/tclPkg.c.origThu Mar 25 22:50:56 1999
    
    --- generic/tclPkg.cThu Mar 25 23:07:54 1999
    
    ***************
    
    *** 109,114 ****
    
    --- 109,117 ----
    
      return TCL_OK;
    
          }
    
          if (ComparePkgVersions(pkgPtr->version, version, (int *) NULL) == 0) {
    
    + if (clientData != NULL) {
    
    +     pkgPtr->clientData = clientData;
    
    + }
    
      return TCL_OK;
    
          }
    
          Tcl_AppendResult(interp, "conflicting versions provided for package \"",
    
    ***************
    
    *** 310,324 ****
    
              if (clientDataPtr) {
    
          *clientDataPtr = pkgPtr->clientData;
    
      }
    
    -     
    
    -         if (clientDataPtr) {
    
    -     *clientDataPtr = pkgPtr->clientData;
    
    - }
    
    -     
    
      return pkgPtr->version;
    
          }
    
          result = ComparePkgVersions(pkgPtr->version, version, &satisfies);
    
          if ((satisfies && !exact) || (result == 0)) {
    
      return pkgPtr->version;
    
          }
    
          Tcl_AppendResult(interp, "version conflict for package \"",
    
    --- 313,325 ----
    
              if (clientDataPtr) {
    
          *clientDataPtr = pkgPtr->clientData;
    
      }
    
      return pkgPtr->version;
    
          }
    
          result = ComparePkgVersions(pkgPtr->version, version, &satisfies);
    
          if ((satisfies && !exact) || (result == 0)) {
    
    +         if (clientDataPtr) {
    
    +     *clientDataPtr = pkgPtr->clientData;
    
    + }
    
      return pkgPtr->version;
    
          }
    
          Tcl_AppendResult(interp, "version conflict for package \"",
    
    
    
    
    
    
    
    
    
    PatchFiles:
    
        tclPkg.c
    
        
    
    
    
    
    
    
    
    04/05/1999 18:06 - redman - Already applied by Scott Stanton on 3/25/99
    
  4. foundin changed to: "obsolete: 8.1b2"
  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: "Stub table registration corrupt"
  11. type changed to: "Bug"