diff options
| author | dgp <dgp@users.sourceforge.net> | 2022-09-15 18:34:56 (GMT) |
|---|---|---|
| committer | dgp <dgp@users.sourceforge.net> | 2022-09-15 18:34:56 (GMT) |
| commit | 95b9c7ea088595db27c858b2f8c651f4a5a27e3b (patch) | |
| tree | eca1b346fe8cd3402e79e3b5b6d4e2b1956dba96 | |
| parent | 0371b9ed8d4bd0943122234faf1c03cfc14b3405 (diff) | |
| download | tcl-95b9c7ea088595db27c858b2f8c651f4a5a27e3b.zip tcl-95b9c7ea088595db27c858b2f8c651f4a5a27e3b.tar.gz tcl-95b9c7ea088595db27c858b2f8c651f4a5a27e3b.tar.bz2 | |
When zipfs is finalized, be sure to unregister it. If this isn't done,
then path resolution can re-enter the zipfs implementation code and try to
lookup pathnames in hash tables that have been deleted. Crash! Panic! Bad!
I see this easily in an app that embeds Tcl/Tk and uses multiple interps.
Did not easily find a demo script in Tcl alone.
| -rw-r--r-- | generic/tclZipfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index 82e125c..3b1d787 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -5773,6 +5773,7 @@ ZipfsExitHandler( static void ZipfsFinalize(void) { + Tcl_FSUnregister(&zipfsFilesystem); Tcl_DeleteHashTable(&ZipFS.fileHash); ckfree(ZipFS.fallbackEntryEncoding); ZipFS.initialized = -1; |
