Stub table registration corrupt
Closed / Fixed218661ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:03:49
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
welch Closed ticket [218661ffff].
[History diff]2000-10-26 08:26:11
dgp Ticket [218661ffff]: 3 changes
[History diff]2001-04-17 05:44:32
Log in (anonymous is fine) to add a comment.