Index: ChangeLog ================================================================== --- ChangeLog +++ ChangeLog @@ -1,8 +1,8 @@ A NOTE ON THE CHANGELOG: Starting in early 2011, Tcl source code has been under the management of -fossil, hosted at http://core.tcl.tk/tcl/ . Fossil presents a "Timeline" +fossil, hosted at https://core.tcl-lang.org/tcl/ . Fossil presents a "Timeline" view of changes made that is superior in every way to a hand edited log file. Because of this, many Tcl developers are now out of the habit of maintaining this log file. You may still find useful things in it, but the Timeline is a better first place to look now. ============================================================================ Index: README ================================================================== --- README +++ README @@ -1,7 +1,7 @@ README: Tcl - This is the Tcl 8.6.8 source distribution. + This is the Tcl 8.6.9 source distribution. http://sourceforge.net/projects/tcl/files/Tcl/ You can get any source release of Tcl from the URL above. Contents -------- @@ -27,19 +27,19 @@ Tcl is maintained, enhanced, and distributed freely by the Tcl community. Source code development and tracking of bug reports and feature requests takes place at: - http://core.tcl.tk/ + http://core.tcl-lang.org/ Tcl/Tk release and mailing list services are hosted by SourceForge: http://sourceforge.net/projects/tcl/ with the Tcl Developer Xchange hosted at: - http://www.tcl.tk/ + http://www.tcl-lang.org/ Tcl is a freely available open source package. You can do virtually anything you like with it, such as modifying it, redistributing it, and selling it either in whole or in part. See the file "license.terms" for complete information. @@ -47,25 +47,25 @@ 2. Documentation ---------------- Extensive documentation is available at our website. The home page for this release, including new features, is - http://www.tcl.tk/software/tcltk/8.6.html + http://www.tcl-lang.org/software/tcltk/8.6.html Detailed release notes can be found at the file distributions page by clicking on the relevant version. http://sourceforge.net/projects/tcl/files/Tcl/ Information about Tcl itself can be found at - http://www.tcl.tk/about/ + http://www.tcl-lang.org/about/ There have been many Tcl books on the market. Many are mentioned in the Wiki: - http://wiki.tcl.tk/_/ref?N=25206 + http://wiki.tcl-lang.org/_/ref?N=25206 To view the complete set of reference manual entries for Tcl 8.6 online, visit the URL: - http://www.tcl.tk/man/tcl8.6/ + http://www.tcl-lang.org/man/tcl8.6/ 2a. Unix Documentation ---------------------- The "doc" subdirectory in this release contains a complete set of @@ -99,11 +99,11 @@ There are brief notes in the unix/README, win/README, and macosx/README about compiling on these different platforms. There is additional information about building Tcl from sources at - http://www.tcl.tk/doc/howto/compile.html + http://www.tcl-lang.org/doc/howto/compile.html 4. Development tools --------------------------- ActiveState produces a high quality set of commercial quality development @@ -125,11 +125,11 @@ 6. Tcl'ers Wiki --------------- A Wiki-based open community site covering all aspects of Tcl/Tk is at: - http://wiki.tcl.tk/ + http://wiki.tcl-lang.org/ It is dedicated to the Tcl programming language and its extensions. A wealth of useful information can be found there. It contains code snippets, references to papers, books, and FAQs, as well as pointers to development tools, extensions, and applications. You can also recommend @@ -151,11 +151,11 @@ We are very interested in receiving bug reports, patches, and suggestions for improvements. We prefer that you send this information to us as tickets entered into our tracker at: - http://core.tcl.tk/tcl/reportlist + http://core.tcl-lang.org/tcl/reportlist We will log and follow-up on each bug, although we cannot promise a specific turn-around time. Enhancements may take longer and may not happen at all unless there is widespread support for them (we're trying to slow the rate at which Tcl/Tk turns into a kitchen sink). It's very @@ -167,19 +167,19 @@ comp.lang.tcl. We read the newsgroup and will attempt to answer esoteric questions for which no one else is likely to know the answer. In addition, see the following Web site for links to other organizations that offer Tcl/Tk training: - http://wiki.tcl.tk/training + http://wiki.tcl-lang.org/training 9. Tracking Development ----------------------- Tcl is developed in public. To keep an eye on how Tcl is changing, see - http://core.tcl.tk/ + http://core.tcl-lang.org/ 10. Thank You ------------- We'd like to express our thanks to the Tcl community for all the helpful suggestions, bug reports, and patches we have received. Tcl/Tk has improved vastly and will continue to do so with your help. Index: changes ================================================================== --- changes +++ changes @@ -8828,5 +8828,69 @@ 2017-12-08 (new)[TIP 477] nmake build system reform (nadkarni) 2017-12-19 (bug)[586e71] EvalObjv exception handling at level #0 (sebres,porter) --- Released 8.6.8, December 22, 2017 --- http://core.tcl.tk/tcl/ for details + +2018-02-11 (enhance) stop blocking conversion of object to/from class (coulter) + +2018-02-12 (enhance) NR-enable [package require] (coulter) + +2018-02-14 (bug)[9fd5c6] crash in object deletion, test oo-11.5 (coulter) + +2018-02-14 (bug)[3c32a3] crash deleting object with class mixed in (coulter) + +2018-02-15 (platform) stop using -lieee, removed from glibc-2.27 (porter) +***POTENTIAL INCOMPATIBILITY for math programs that embed Tcl*** + +2018-02-23 (bug)[8e6a9a] bad binary [string match], test string-11.55 (porter) + +2018-03-05 (bug)[1873ea] repair multi-thread std channel init (sebres) + +2018-03-09 (bug)[db36fa] broken bytecode for index values (porter) + +2018-03-13 (bug) broken compiled [string replace], test string-14.19 (porter) + +2018-03-14 (bug) [string trim*] engine crashed on invalid UTF (sebres) + +2018-04-17 (bug) missing trace in compiled [array set], test var-20.11 (porter) + +2018-04-22 (bug)[46a241] crash in unset array with search, var-13.[23] (goth) + +2018-04-30 (bug)[27b682] race made [file delete] raise "no such file" (sebres) + +2018-06-04 (bug)[925643] 32/64 cleanup of filesystem DIR operations (sebres) + +2018-06-18 (bug) leaks in TclSetEnv and env cache (coulter) + +2018-06-24 (bug)[3592747] [yieldto] dying namespace, tailcall-14.1 (coulter) + +2018-07-09 (bug)[270f78] race in [file mkdir] (sebres) + +2018-07-12 (bug)[3f7af0] [file delete] raised "permission denied" (sebres) + +2018-07-26 (bug)[d051b7] overflow crash in [format] (sebres) + +2018-08-29 revised quoting of [exec] args in generated command line (sebres) +***POTENTIAL INCOMPATIBILITY*** + +2018-09-20 HTTP Keep-Alive with pipelined requests (nash) +=> http 2.9.0 + +2018-09-27 (new)[TIP 505] [lreplace] accepts all out of range indices (porter) + +2018-10-04 (bug) Prevent crash from NULL keyName (nijtmans) +=> registry 1.3.3 + +2018-10-26 (enhance) advance dde version (nijtmans) +=> dde 1.4.1 + +2018-10-27 tzdata updated to Olson's tzdata2018g (jima) + +2018-10-29 Update tcltest package for Travis support (fellows) +=> tcltest 2.5.0 + +2018-11-09 (bug)[35a8f1] overlong string length of some lists (owens) + +2018-11-16 (bug)[00d04c] Repair [binary encode base64] (sebres) + +- Released 8.6.9, November 16, 2018 - details at http://core.tcl-lang.org/tcl/ - Index: generic/tcl.h ================================================================== --- generic/tcl.h +++ generic/tcl.h @@ -40,27 +40,23 @@ * library/init.tcl (1 LOC patch) * unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch) * win/configure.in (as above) * win/tcl.m4 (not patchlevel) * README (sections 0 and 2, with and without separator) - * macosx/Tcl.pbproj/project.pbxproj (not patchlevel) 1 LOC - * macosx/Tcl.pbproj/default.pbxuser (not patchlevel) 1 LOC - * macosx/Tcl.xcode/project.pbxproj (not patchlevel) 2 LOC - * macosx/Tcl.xcode/default.pbxuser (not patchlevel) 1 LOC * macosx/Tcl-Common.xcconfig (not patchlevel) 1 LOC * win/README (not patchlevel) (sections 0 and 2) * unix/tcl.spec (1 LOC patch) * tools/tcl.hpj.in (not patchlevel, for windows installer) */ #define TCL_MAJOR_VERSION 8 #define TCL_MINOR_VERSION 6 #define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE -#define TCL_RELEASE_SERIAL 8 +#define TCL_RELEASE_SERIAL 9 #define TCL_VERSION "8.6" -#define TCL_PATCH_LEVEL "8.6.8" +#define TCL_PATCH_LEVEL "8.6.9" /* *---------------------------------------------------------------------------- * The following definitions set up the proper options for Windows compilers. * We use this method because there is no autoconf equivalent. Index: generic/tclBinary.c ================================================================== --- generic/tclBinary.c +++ generic/tclBinary.c @@ -2912,10 +2912,15 @@ if (data < dataend) { c = *data++; } else if (i > 1) { c = '='; } else { + if (strict && i <= 1) { + /* single resp. unfulfilled char (each 4th next single char) + * is rather bad64 error case in strict mode */ + goto bad64; + } cut += 3; break; } /* @@ -2942,13 +2947,15 @@ value = (value << 6) | ((c - '0' + 52) & 0x3f); } else if (c == '+') { value = (value << 6) | 0x3e; } else if (c == '/') { value = (value << 6) | 0x3f; - } else if (c == '=') { + } else if (c == '=' && ( + !strict || i > 1) /* "=" and "a=" is rather bad64 error case in strict mode */ + ) { value <<= 6; - cut++; + if (i) cut++; } else if (strict || !isspace(c)) { goto bad64; } else { i--; } Index: generic/tclListObj.c ================================================================== --- generic/tclListObj.c +++ generic/tclListObj.c @@ -1988,20 +1988,37 @@ /* * Pass 2: copy into string rep buffer. */ + /* + * We used to set the string length here, relying on a presumed + * guarantee that the number of bytes TclScanElement() calls reported + * to be needed was a precise count and not an over-estimate, so long + * as the same flag values were passed to TclConvertElement(). + * + * Then we saw [35a8f1c04a], where a bug in TclScanElement() caused + * that guarantee to fail. Rather than trust there are no more bugs, + * we set the length after the loop based on what was actually written, + * an not on what was predicted. + * listPtr->length = bytesNeeded - 1; + * + */ + listPtr->bytes = ckalloc(bytesNeeded); dst = listPtr->bytes; for (i = 0; i < numElems; i++) { flagPtr[i] |= (i ? TCL_DONT_QUOTE_HASH : 0); elem = TclGetStringFromObj(elemPtrs[i], &length); dst += TclConvertElement(elem, length, dst, flagPtr[i]); *dst++ = ' '; } - listPtr->bytes[listPtr->length] = '\0'; + dst[-1] = '\0'; + + /* Here is the safe setting of the string length. */ + listPtr->length = dst - 1 - listPtr->bytes; if (flagPtr != localFlags) { ckfree(flagPtr); } } Index: generic/tclOO.c ================================================================== --- generic/tclOO.c +++ generic/tclOO.c @@ -1033,11 +1033,10 @@ } if (IsRootClass(oPtr) && !Deleted(fPtr->objectCls->thisPtr)) { Tcl_DeleteCommandFromToken(interp, fPtr->objectCls->thisPtr->command); } - oPtr->classPtr = NULL; } /* * ---------------------------------------------------------------------- * @@ -1147,11 +1146,13 @@ if (oPtr->mixins.num > 0) { FOREACH(mixinPtr, oPtr->mixins) { TclOORemoveFromInstances(oPtr, mixinPtr); TclOODecrRefCount(mixinPtr->thisPtr); } - ckfree(oPtr->mixins.list); + if (oPtr->mixins.list != NULL) { + ckfree(oPtr->mixins.list); + } } FOREACH(filterObj, oPtr->filters) { TclDecrRefCount(filterObj); } @@ -1347,10 +1348,14 @@ RemoveItem(Class, oPtr->mixins, i); TclOODecrRefCount(mixPtr->thisPtr); res++; break; } + } + if (oPtr->mixins.num == 0) { + ckfree(oPtr->mixins.list); + oPtr->mixins.list = NULL; } return res; } /* Index: generic/tclOODefineCmds.c ================================================================== --- generic/tclOODefineCmds.c +++ generic/tclOODefineCmds.c @@ -1155,10 +1155,12 @@ oPtr->fPtr->epoch++; oPtr->flags |= DONT_DELETE; TclOODeleteDescendants(interp, oPtr); oPtr->flags &= ~DONT_DELETE; TclOOReleaseClassContents(interp, oPtr); + ckfree(oPtr->classPtr); + oPtr->classPtr = NULL; } else if (!wasClass && willBeClass) { TclOOAllocClass(interp, oPtr); } if (oPtr->classPtr != NULL) { Index: generic/tclUtil.c ================================================================== --- generic/tclUtil.c +++ generic/tclUtil.c @@ -1043,10 +1043,27 @@ */ *flagPtr = CONVERT_BRACE; return 2; } + +#if COMPAT + /* + * We have an established history in TclConvertElement() when quoting + * because of a leading hash character to force what would be the + * CONVERT_MASK mode into the CONVERT_BRACE mode. That is, we format + * the element #{a"b} like this: + * {#{a"b}} + * and not like this: + * \#{a\"b} + * This is inconsistent with [list x{a"b}], but we will not change that now. + * Set that preference here so that we compute a tight size requirement. + */ + if ((*src == '#') && !(*flagPtr & TCL_DONT_QUOTE_HASH)) { + preferBrace = 1; + } +#endif if ((*p == '{') || (*p == '"')) { /* * Must escape or protect so leading character of value is not * misinterpreted as list element delimiting syntax. Index: library/init.tcl ================================================================== --- library/init.tcl +++ library/init.tcl @@ -14,11 +14,11 @@ # This test intentionally written in pre-7.5 Tcl if {[info commands package] == ""} { error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]" } -package require -exact Tcl 8.6.8 +package require -exact Tcl 8.6.9 # Compute the auto path to use in this interpreter. # The values on the path come from several locations: # # The environment variable TCLLIBPATH Index: library/tcltest/tcltest.tcl ================================================================== --- library/tcltest/tcltest.tcl +++ library/tcltest/tcltest.tcl @@ -2750,10 +2750,11 @@ variable testSingleFile variable numTestFiles variable numTests variable failFiles variable DefaultValue + set failFilesAccum {} FillFilesExisted if {[llength [info level 0]] == 1} { set shell [interpreter] } @@ -2839,10 +2840,11 @@ foreach index {Total Passed Skipped Failed} { incr numTests($index) [set $index] } if {$Failed > 0} { lappend failFiles $testFile + lappend failFilesAccum $testFile } } elseif {[regexp [join { {^Number of tests skipped } {for each constraint:} {|^\t(\d+)\t(.+)$} @@ -2885,11 +2887,11 @@ set endTime [eval $timeCmd] puts [outputChannel] "\n$dir test ended at $endTime" puts [outputChannel] "" puts [outputChannel] [string repeat ~ 44] } - return [info exists testFileFailures] + return [expr {[info exists testFileFailures] || [llength $failFilesAccum]}] } ##################################################################### # Test utility procs - not used in tcltest, but may be useful for Index: tests/binary.test ================================================================== --- tests/binary.test +++ tests/binary.test @@ -2709,10 +2709,50 @@ list [string length [set r [binary decode base64 -strict WFla\n]]] $r } -returnCodes error -match glob -result {invalid base64 character *} test binary-73.31 {binary decode base64} -body { list [string length [set r [binary decode base64 WA==WFla]]] $r } -returnCodes error -match glob -result {invalid base64 character *} +test binary-73.32 {binary decode base64, bug [00d04c4f12]} -body { + list \ + [string length [binary decode base64 =]] \ + [string length [binary decode base64 " ="]] \ + [string length [binary decode base64 " ="]] \ + [string length [binary decode base64 "\r\n\t="]] \ +} -result [lrepeat 4 0] +test binary-73.33 {binary decode base64, bug [00d04c4f12]} -body { + list \ + [string length [binary decode base64 ==]] \ + [string length [binary decode base64 " =="]] \ + [string length [binary decode base64 " =="]] \ + [string length [binary decode base64 " =="]] \ +} -result [lrepeat 4 0] +test binary-73.34 {binary decode base64, (compatibility) unfulfilled base64 (single char) in non-strict mode} -body { + list \ + [expr {[binary decode base64 a] eq [binary decode base64 ""]}] \ + [expr {[binary decode base64 abcda] eq [binary decode base64 "abcd"]}] +} -result [lrepeat 2 1] +test binary-73.35 {binary decode base64, bad base64 in strict mode} -body { + set r {} + foreach c {a " a" " a" " a" " a" abcda abcdabcda a= a== abcda= abcda==} { + lappend r \ + [catch {binary decode base64 $c}] \ + [catch {binary decode base64 -strict $c}] + } + set r +} -result [lrepeat 11 0 1] +test binary-73.36 {binary decode base64: check encoded & decoded equals original} -body { + set r {} + for {set i 0} {$i < 255 && [llength $r] < 20} {incr i} { + foreach c {1 2 3 4 5 6 7 8} { + set c [string repeat [format %c $i] $c] + if {[set a [binary decode base64 [set x [binary encode base64 $c]]]] ne $c} { + lappend r "encode & decode is wrong on string `$c` (encoded: $x): `$a` != `$c`" + } + } + } + join $r \n +} -result {} test binary-74.1 {binary encode uuencode} -body { binary encode uuencode } -returnCodes error -match glob -result "wrong # args: *" test binary-74.2 {binary encode uuencode} -body { Index: tests/list.test ================================================================== --- tests/list.test +++ tests/list.test @@ -126,9 +126,27 @@ } {alex annie bill carol fred julie} test list-4.1 {Bug 3173086} { string is list "{[list \\\\\}]}" } 1 +test list-4.2 {Bug 35a8f1c04a, check correct str-rep} { + set result {} + foreach i { + {#"} {#"""} {#"""""""""""""""} + "#\"{" "#\"\"\"{" "#\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\{" + "#\"}" "#\"\"\"}" "#\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\}" + } { + set list [list $i] + set list [string trim " $list "] + if {[llength $list] > 1 || $i ne [lindex $list 0]} { + lappend result "wrong string-representation of list by '$i', length: [llength $list], list: '$list'" + } + } + set result [join $result \n] +} {} +test list-4.3 {Bug 35a8f1c04a, check correct string length} { + string length [list #""] +} 5 # cleanup ::tcltest::cleanupTests return Index: unix/configure ================================================================== --- unix/configure +++ unix/configure @@ -1333,11 +1333,11 @@ TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL=".8" +TCL_PATCH_LEVEL=".9" VERSION=${TCL_VERSION} EXTRA_INSTALL_BINARIES=${EXTRA_INSTALL_BINARIES:-"@:"} EXTRA_BUILD_HTML=${EXTRA_BUILD_HTML:-"@:"} Index: unix/configure.in ================================================================== --- unix/configure.in +++ unix/configure.in @@ -23,11 +23,11 @@ ]) TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL=".8" +TCL_PATCH_LEVEL=".9" VERSION=${TCL_VERSION} EXTRA_INSTALL_BINARIES=${EXTRA_INSTALL_BINARIES:-"@:"} EXTRA_BUILD_HTML=${EXTRA_BUILD_HTML:-"@:"} Index: unix/tcl.spec ================================================================== --- unix/tcl.spec +++ unix/tcl.spec @@ -2,11 +2,11 @@ %{!?directory:%define directory /usr/local} Name: tcl Summary: Tcl scripting language development environment -Version: 8.6.8 +Version: 8.6.9 Release: 2 License: BSD Group: Development/Languages Source: http://prdownloads.sourceforge.net/tcl/tcl%{version}-src.tar.gz URL: http://www.tcl.tk/ Index: unix/tclConfig.h.in ================================================================== --- unix/tclConfig.h.in +++ unix/tclConfig.h.in @@ -28,10 +28,13 @@ /* Do we have access to Darwin CoreFoundation.framework? */ #undef HAVE_COREFOUNDATION /* Is the cpuid instruction usable? */ #undef HAVE_CPUID + +/* Is 'DIR64' in ? */ +#undef HAVE_DIR64 /* Define to 1 if you have the `freeaddrinfo' function. */ #undef HAVE_FREEADDRINFO /* Do we have fts functions? */ @@ -194,13 +197,10 @@ #undef HAVE_STRUCT_ADDRINFO /* Is 'struct dirent64' in ? */ #undef HAVE_STRUCT_DIRENT64 -/* Is 'DIR64' in ? */ -#undef HAVE_DIR64 - /* Define to 1 if the system has the type `struct in6_addr'. */ #undef HAVE_STRUCT_IN6_ADDR /* Define to 1 if the system has the type `struct sockaddr_in6'. */ #undef HAVE_STRUCT_SOCKADDR_IN6 @@ -494,13 +494,10 @@ #undef size_t /* Define as int if socklen_t is not available */ #undef socklen_t -/* Do we want to use the strtod() in compat? */ -#undef strtod - /* Define to `int' if doesn't define. */ #undef uid_t /* Unsigned integer type wide enough to hold a pointer. */ #undef uintptr_t Index: win/configure ================================================================== --- win/configure +++ win/configure @@ -1309,11 +1309,11 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL=".8" +TCL_PATCH_LEVEL=".9" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.4 TCL_DDE_MAJOR_VERSION=1 TCL_DDE_MINOR_VERSION=4 Index: win/configure.in ================================================================== --- win/configure.in +++ win/configure.in @@ -12,11 +12,11 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL=".8" +TCL_PATCH_LEVEL=".9" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.4 TCL_DDE_MAJOR_VERSION=1 TCL_DDE_MINOR_VERSION=4