diff options
author | dinoex <dinoex@FreeBSD.org> | 2003-04-23 02:14:06 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2003-04-23 02:14:06 +0800 |
commit | 7fefb35048b8a952782c088ac78975d4d6e0fa0e (patch) | |
tree | 44e489fd7248306ff1611fe8c4cf0c0216ecf1f3 /lang/tcl83 | |
parent | 86dbcc766fa016a1fa46011374b3716475ffdfdb (diff) | |
download | freebsd-ports-gnome-7fefb35048b8a952782c088ac78975d4d6e0fa0e.tar.gz freebsd-ports-gnome-7fefb35048b8a952782c088ac78975d4d6e0fa0e.tar.zst freebsd-ports-gnome-7fefb35048b8a952782c088ac78975d4d6e0fa0e.zip |
- Added patch from tcl8.4
Certain character set encodings can cause tcl to core dump in
TclFinalizeEncodingSubsystem().
PR: 51273
Submitted by: truckman
Diffstat (limited to 'lang/tcl83')
-rw-r--r-- | lang/tcl83/Makefile | 2 | ||||
-rw-r--r-- | lang/tcl83/files/patch-tclEncoding.c | 30 |
2 files changed, 31 insertions, 1 deletions
diff --git a/lang/tcl83/Makefile b/lang/tcl83/Makefile index 1e79381e95ac..0b9388b46dd5 100644 --- a/lang/tcl83/Makefile +++ b/lang/tcl83/Makefile @@ -7,7 +7,7 @@ PORTNAME= tcl PORTVERSION= 8.3.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= lang tcl83 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= tcl diff --git a/lang/tcl83/files/patch-tclEncoding.c b/lang/tcl83/files/patch-tclEncoding.c new file mode 100644 index 000000000000..3250bffa568c --- /dev/null +++ b/lang/tcl83/files/patch-tclEncoding.c @@ -0,0 +1,30 @@ +--- ../generic/tclEncoding.c.orig Thu Apr 5 13:28:52 2001 ++++ ../generic/tclEncoding.c Thu Apr 10 00:49:34 2003 +@@ -310,19 +310,19 @@ + { + Tcl_HashSearch search; + Tcl_HashEntry *hPtr; +- Encoding *encodingPtr; + + Tcl_MutexLock(&encodingMutex); + encodingsInitialized = 0; + hPtr = Tcl_FirstHashEntry(&encodingTable, &search); + while (hPtr != NULL) { +- encodingPtr = (Encoding *) Tcl_GetHashValue(hPtr); +- if (encodingPtr->freeProc != NULL) { +- (*encodingPtr->freeProc)(encodingPtr->clientData); +- } +- ckfree((char *) encodingPtr->name); +- ckfree((char *) encodingPtr); +- hPtr = Tcl_NextHashEntry(&search); ++ /* ++ * Call FreeEncoding instead of doing it directly to handle refcounts ++ * like escape encodings use. [Bug #524674] ++ * Make sure to call Tcl_FirstHashEntry repeatedly so that all ++ * encodings are eventually cleaned up. ++ */ ++ FreeEncoding((Tcl_Encoding) Tcl_GetHashValue(hPtr)); ++ hPtr = Tcl_FirstHashEntry(&encodingTable, &search); + } + Tcl_DeleteHashTable(&encodingTable); + Tcl_MutexUnlock(&encodingMutex); |