The source code for Tcl is managed by fossil. Tcl developers coordinate all changes to the Tcl source code at
Release Tcl 9.1.1 arises from the check-in with tag core-9-1-1.
Tcl patch releases have the primary purpose of delivering bug fixes to the userbase.
Bug fixes
- regexp sometimes allows an invalid backref to be matched
- regexp -all did not try to match at the end of the string
- regexp/regsub -all restarted matching on the substring after the previous match
- with REG_BOSONLY only the first alternative was anchored at the beginning of the string
- TclUnixWaitForFile: infinite wait may return early
- lsearch -regexp released the pattern when matching failed
- restore the blocking mode when "socket -async" connects at once
- compiled [clock clicks -mi] should give "ambiguous option" error
- writing a file beyond the file size limit (ulimit -f) killed the process
- Incorrect argument handling by [regexp]
- compiled regexp behaves differently
- a {1,1} quantifier was always dropped as vacuous
- regexp with backreferences could loop forever
- remove empty directories from the zipfs VFS with POSIX find options
- tailcall panicked in a command called directly by its objProc
- compiled [self n] should be ambiguous
- difference between bcc'ed and eval'ed regexp
- regsub always asked the regexp engine for 10 submatches
- regsub -command panics with more than 9 capturing groups
- Problem with ::http::OpenSocket
- on Windows a joinable thread which exits before it is joined leaked
- on Unix, Tcl_JoinThread() should not call pthread_join() for detached threads
- zlib-8.3 and zlib-9.3 connected to localhost
- zipfs channels never generated file events
- interp create resets the system encoding set by encoding system
- traceback using clock format with locale of he_IL
- he locale: BCE and CE era names are swapped
- format %A garbles negative, padded and infinite values
- socket-2.12 failed on OpenBSD
- do not throw from [socket -async] when the connect fails at once
- test portability for illumos: skip socket-14.19 where SO_REUSEPORT is not supported
- lset with several indices on an abstract list (lseq) used a freed sublist
- lset errors during appending operation left original list modified
- http.test: use a port just released by the OS for badurl
- the regexp engine could overflow the C stack on deeply nested REs
- [clock scan] put the half-hour time zones 30 minutes off
- safe interp got the parent's -errorinfo and -errorstack through a failing alias
- threaded allocator could not be disabled with -DUSE_THREAD_ALLOC=0 or nmake OPTS=tclalloc
- win/configure: --with-system-zlib and --with-system-libtommath
- Windows: make distclean left tcl.pc behind
- Windows: native MSYS2/Cygwin builds no longer need an installed tclsh
- build failure on Alpine Linux (musl): no sys/queue.h
- exec hangs, iff stdin & stdout both were previously closed.
- viewport meta tag in the generated HTML pages for mobile browsers
- no longer replace "::" in manual page with "_" on installation
- tcl_startOfPreviousWord ignores the last character when start is the string length
- glob matching can take exponential time
- Make packages work in an out-of-tree build with "configure --srcdir=..."
- tclLoadDl.c dlerror() is not thread safe"
- msgcat did not check the locales
- -Wformat warnings with MSYS2 UCRT64
- error deleting: file already exists on Vista
- lset on empty list is allowed when index argument is large
- missing locks, when transferring a channel to another thread
- epoll notifier spins and never reports writable after EPOLLERR
- don't wait in a blocking "gets" on a channel with a reflected transform
- Unsetting env vars in slave interps
- Memory corruption false positive with TCL_MEM_DEBUG
- Windows: [file delete -force] failed on a directory containing a symbolic link
- lpop/lset/join crashes with abstract lists
- Heap out-of-bounds read and NULL dereference in 'clock'
- Stack and heap buffer overflow in 'clock format %z'
- Crash from race condition in Unix locale initialization
- non-zipfs builds with relocated library misses encodings
- Undefined pointer arithmetic in
INST_LREPLACE - http::geturl -keepalive intermittent socketWrState errors
- Segault upon sequence of execution traces
- Tcl_DeleteEventSource called from a setup or check proc
- a child process created by fork() could deadlock on its first allocation
- use an acquire load for the unlocked check and a release store
- file cmd fails to copy to VFAT
Updated bundled packages, libraries, standards, data
- http 2.10.3
- msgcat 1.7.2
- sqlite3 3.54.1
- tcltest 2.6.1
- tcl::idna 1.0.2
- tzdata 2026f
- zlib 1.4.0
Release Tcl 9.1.0 arises from the check-in with tag core-9-1-0.
Highlighted differences between Tcl 9.1 and Tcl 9.0 are summarized below, with focus on changes important to programmers using the Tcl library and writing Tcl scripts.
Incompatibilities
- Remove
exprbehavior fromlseqIncompatibility - File paths are now treated as case-insensitive on MacOS Incompatibility
- New command
tcl::registryas replacement for theregistrycommand without needing the registry package to be loaded. The registry module is now part of the core Tcl DLL in all build configurations. - Custom applications must call Tcl_FindExecutable or TclZipfs_AppHook to initialize Tcl Potential incompatibility
- Search path for locating Tcl core script and encodings is changed Potential incompatibility
New commands and options
- New options
-backslashes,-commandsand-variablesforsubstcommand - New command
unicodefor Unicode normalization - New
timercommand, switch to monotonic clock and microsecond resolution - New
lfiltercommand for selecting items from a list - Many new functions from C99, specifically:
acosh(),asinh(),atanh(),cbrt(),copysign(),dim(),erf(),erfc(),exp2(),expm1(),fma(),gamma(),ldexp(),lgamma(),log1p(),log2(),logb(),nextafter(),remainder(),signbit(), andtrunc(), and (for functions that return multiple values in their C99 API) the commands:divmod,frexp,modf, andremquo. (See this page for more information about these functions; the Tcl functions are intentionally only thin wrappers around the functions in the C99 standard.) - New
switchoption-integerto compare values as integers - Reading and writing of child interpreter variables
- Updated Tcl Bytecode opcodes
New
tcltest::configureoption-iterationsto control number of iterations of each test.
New public C API
Tcl_IsEmpty()— checks if the string representation of a value would be the empty stringTcl_GetEncodingNameForUser()— returns name of encoding from user settingsTcl_AttemptCreateHashEntry()— version ofTcl_CreateHashEntry()that returns NULL instead of panic'ing on memory allocation errorsTcl_ListObjRange(),Tcl_ListObjRepeat(),Tcl_ListObjReverse()— C API for new list operationsTcl_UtfToNormalized(),Tcl_UtfToNormalizedDString()— C API for Unicode normalizationTcl_UtfToExternalEx()andTcl_ExternalToUtfEx()— C encoding API supporting output buffers larger than INT_MAX- New API for monotonic clock and microseconds resolution
- Windows
auto_execokenhancements andexecsearch reform - New timer API using long long in stead of Tcl_Time
Tcl_RegisterPostInitProccallback for post-initialization of interpreters
Performance
- Memory efficient internal representations for list operations on large lists.
- Continued 64-bit capacity: Command line arguments larger than 2Gb
- Support for long paths on Windows
- Faster UTF-8 encoding and I/O
- Faster interpreter creation
Bug fixes
- Inconsistent
globmatching on MacOS file normalizedoes not uniquely identify a file on MacOS- Inconsistencies between
cdandfile normalizefor volume-relative paths on Windows - Tcl cannot run from an arbitrary build directory with --disable-zipfs
- Crash on finalization with an active thread running.
- Crash on use-after-free in Windows socket thread.
Updated bundled packages, libraries, standards, data
- Unicode 18.0.0
- platform 1.2.0: Add support for musl C runtime
