From 95b9c7ea088595db27c858b2f8c651f4a5a27e3b Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 15 Sep 2022 18:34:56 +0000 Subject: 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. --- generic/tclZipfs.c | 1 + 1 file changed, 1 insertion(+) 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; -- cgit v0.12