[Pkg-tcltk-commits] r1647 - in tk8.6/trunk/debian: . patches
sgolovan at alioth.debian.org
sgolovan at alioth.debian.org
Fri Jul 18 18:51:41 UTC 2014
Author: sgolovan
Date: 2014-07-18 18:51:41 +0000 (Fri, 18 Jul 2014)
New Revision: 1647
Added:
tk8.6/trunk/debian/patches/shutdown-crash.diff
Modified:
tk8.6/trunk/debian/changelog
tk8.6/trunk/debian/patches/series
Log:
[tk8.6]
* Added patch from upstream which fixes freeing fonts on exit (thanks
to Adam Conrad <adconrad at ubuntu.com> for picking it up, closes: #755195).
Modified: tk8.6/trunk/debian/changelog
===================================================================
--- tk8.6/trunk/debian/changelog 2014-07-14 07:30:56 UTC (rev 1646)
+++ tk8.6/trunk/debian/changelog 2014-07-18 18:51:41 UTC (rev 1647)
@@ -1,8 +1,9 @@
-tk8.6 (8.6.1-6) UNRELEASED; urgency=low
+tk8.6 (8.6.1-6) unstable; urgency=low
- * NOT RELEASED YET
+ * Added patch from upstream which fixes freeing fonts on exit (thanks
+ to Adam Conrad <adconrad at ubuntu.com> for picking it up, closes: #755195).
- -- Sergei Golovan <sgolovan at debian.org> Sat, 08 Mar 2014 13:37:56 +0400
+ -- Sergei Golovan <sgolovan at debian.org> Fri, 18 Jul 2014 22:51:01 +0400
tk8.6 (8.6.1-5) unstable; urgency=low
Modified: tk8.6/trunk/debian/patches/series
===================================================================
--- tk8.6/trunk/debian/patches/series 2014-07-14 07:30:56 UTC (rev 1646)
+++ tk8.6/trunk/debian/patches/series 2014-07-18 18:51:41 UTC (rev 1647)
@@ -4,3 +4,4 @@
non-linux.diff
manpages.diff
xft.diff
+shutdown-crash.diff
Added: tk8.6/trunk/debian/patches/shutdown-crash.diff
===================================================================
--- tk8.6/trunk/debian/patches/shutdown-crash.diff (rev 0)
+++ tk8.6/trunk/debian/patches/shutdown-crash.diff 2014-07-18 18:51:41 UTC (rev 1647)
@@ -0,0 +1,153 @@
+Description: Fix crash on shutdown
+Bug: http://core.tcl.tk/tk/info/f214b8ad5b
+Origin: http://core.tcl.tk/tk/vpatch?from=8b40f8cacfa04130&to=9fc8df19b1c093ef
+
+Index: generic/tkFont.c
+==================================================================
+--- x/generic/tkFont.c
++++ x/generic/tkFont.c
+@@ -419,11 +419,11 @@
+ searchPtr != NULL;
+ searchPtr = Tcl_NextHashEntry(&search)) {
+ fontsLeft++;
+ #ifdef DEBUG_FONTS
+ fprintf(stderr, "Font %s still in cache.\n",
+- Tcl_GetHashKey(&fiPtr->fontCache, searchPtr));
++ (char *) Tcl_GetHashKey(&fiPtr->fontCache, searchPtr));
+ #endif
+ }
+
+ #ifdef PURIFY
+ if (fontsLeft) {
+@@ -1091,11 +1091,12 @@
+ Tcl_HashEntry *cacheHashPtr, *namedHashPtr;
+ TkFont *fontPtr, *firstFontPtr, *oldFontPtr;
+ int isNew, descent;
+ NamedFont *nfPtr;
+
+- if (objPtr->typePtr != &tkFontObjType) {
++ if (objPtr->typePtr != &tkFontObjType
++ || objPtr->internalRep.twoPtrValue.ptr2 != fiPtr) {
+ SetFontFromAny(interp, objPtr);
+ }
+
+ oldFontPtr = objPtr->internalRep.twoPtrValue.ptr1;
+ if (oldFontPtr != NULL) {
+@@ -1131,10 +1132,11 @@
+ fontPtr = fontPtr->nextPtr) {
+ if (Tk_Screen(tkwin) == fontPtr->screen) {
+ fontPtr->resourceRefCount++;
+ fontPtr->objRefCount++;
+ objPtr->internalRep.twoPtrValue.ptr1 = fontPtr;
++ objPtr->internalRep.twoPtrValue.ptr2 = fiPtr;
+ return (Tk_Font) fontPtr;
+ }
+ }
+
+ /*
+@@ -1241,10 +1243,11 @@
+ fontPtr->underlineHeight = 1;
+ }
+ }
+
+ objPtr->internalRep.twoPtrValue.ptr1 = fontPtr;
++ objPtr->internalRep.twoPtrValue.ptr2 = fiPtr;
+ return (Tk_Font) fontPtr;
+ }
+
+ /*
+ *----------------------------------------------------------------------
+@@ -1273,11 +1276,12 @@
+ {
+ TkFontInfo *fiPtr = ((TkWindow *) tkwin)->mainPtr->fontInfoPtr;
+ TkFont *fontPtr;
+ Tcl_HashEntry *hashPtr;
+
+- if (objPtr->typePtr != &tkFontObjType) {
++ if (objPtr->typePtr != &tkFontObjType
++ || objPtr->internalRep.twoPtrValue.ptr2 != fiPtr) {
+ SetFontFromAny(NULL, objPtr);
+ }
+
+ fontPtr = objPtr->internalRep.twoPtrValue.ptr1;
+ if (fontPtr != NULL) {
+@@ -1309,10 +1313,11 @@
+ for (fontPtr = Tcl_GetHashValue(hashPtr); fontPtr != NULL;
+ fontPtr = fontPtr->nextPtr) {
+ if (Tk_Screen(tkwin) == fontPtr->screen) {
+ fontPtr->objRefCount++;
+ objPtr->internalRep.twoPtrValue.ptr1 = fontPtr;
++ objPtr->internalRep.twoPtrValue.ptr2 = fiPtr;
+ return (Tk_Font) fontPtr;
+ }
+ }
+ }
+
+@@ -1354,10 +1359,11 @@
+ if ((typePtr != NULL) && (typePtr->freeIntRepProc != NULL)) {
+ typePtr->freeIntRepProc(objPtr);
+ }
+ objPtr->typePtr = &tkFontObjType;
+ objPtr->internalRep.twoPtrValue.ptr1 = NULL;
++ objPtr->internalRep.twoPtrValue.ptr2 = NULL;
+
+ return TCL_OK;
+ }
+
+ /*
+@@ -1517,10 +1523,11 @@
+ fontPtr->objRefCount--;
+ if ((fontPtr->resourceRefCount == 0) && (fontPtr->objRefCount == 0)) {
+ ckfree(fontPtr);
+- objPtr->internalRep.twoPtrValue.ptr1 = NULL;
+ }
++ objPtr->internalRep.twoPtrValue.ptr1 = NULL;
++ objPtr->internalRep.twoPtrValue.ptr2 = NULL;
+ }
+ }
+
+ /*
+ *---------------------------------------------------------------------------
+@@ -1547,10 +1554,12 @@
+ {
+ TkFont *fontPtr = srcObjPtr->internalRep.twoPtrValue.ptr1;
+
+ dupObjPtr->typePtr = srcObjPtr->typePtr;
+ dupObjPtr->internalRep.twoPtrValue.ptr1 = fontPtr;
++ dupObjPtr->internalRep.twoPtrValue.ptr2
++ = srcObjPtr->internalRep.twoPtrValue.ptr2;
+
+ if (fontPtr != NULL) {
+ fontPtr->objRefCount++;
+ }
+ }
+
+Index: tests/font.test
+==================================================================
+--- x/tests/font.test
++++ x/tests/font.test
+@@ -2343,13 +2343,23 @@
+
+ test font-46.5 {font actual, too many chars} -body {
+ font actual {times 10} 123456789012345678901234567890123456789012345678901
+ } -returnCodes error -result {expected a single character but got "1234567890123456789012345678901234567..."}
+
++test font-47.1 {Bug f214b8ad5b} -body {
++ interp create one
++ interp create two
++ load {} Tk one
++ load {} Tk two
++ one eval menu .menubar
++ two eval menu .menubar
++ interp delete one
++ interp delete two
++} -result {}
+
+ # cleanup
+ cleanupTests
+ return
+
+
+
+
+
More information about the Pkg-tcltk-commits
mailing list