From cf6557a68f531cc90d3f424f24fcafcdc7cc6f68 Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Tue, 21 Jul 2026 14:21:01 +1000 Subject: [PATCH] G-103: characterize TIP 741 temp-dll cleanup on windows (confirmed flaw) Ran the copy-to-temp characterization on the suite's own tclsh90szip.exe 9.0.5: loading a dll out of a zipfs mount extracts it to %TEMP%\TCL<8hex>\, a new dir per load, none removed on exit. 'info loaded' reports the //zipfs:/ path so the temp copy is invisible to script. Unbounded accumulation confirmed in the wild: 15,609 such dirs in this machine's %TEMP% spanning ~5 months of kit runs. Windows = the known TIP-741 flaw, no in-runtime cleanup in 9.0.5. Linux/WSL and qemu guests still to characterize (unix can unlink-while-mapped, so expect no accumulation - verify). Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com --- goals/G-103-runtime-kit-family.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/goals/G-103-runtime-kit-family.md b/goals/G-103-runtime-kit-family.md index 2477e244..fc57e8e9 100644 --- a/goals/G-103-runtime-kit-family.md +++ b/goals/G-103-runtime-kit-family.md @@ -210,3 +210,20 @@ contract the sequencing note promises G-101. runtimes are the direct consumers (they load batteries this way). Applies equally to G-101's Metakit 8.6 kits (same copy-to-temp). Ref: https://core.tcl-lang.org/tips/doc/trunk/tip/741.md +- 2026-07-21 WINDOWS CHARACTERIZED (suite tclsh90szip.exe 9.0.5): the flaw is + REAL and reproduced on the suite's own runtime. Loading a dll out of a zipfs + mount ('load //zipfs:/mnt/libbin/tcl9thread307.dll Thread') extracts it to a + fresh %TEMP%\TCL<8-hex>\ directory; a NEW directory is created on every + such load (observed TCL00011038, TCL0001743c, TCL6185c1b4 across three runs) + and NONE is removed on process exit. Notes: (a) 'info loaded' reports the + //zipfs:/ path, NOT the temp path - the temp copy is invisible to + script-level introspection, only the filesystem reveals it; (b) unbounded + accumulation confirmed in the wild - this machine's %TEMP% held 15,609 such + TCL* dirs spanning 2026-03-02..2026-07-21 (~5 months), each holding extracted + battery dlls from past kit runs (tcl9thread/twapi/tk/tls/sqlite/vfs/tcllibc, + incl 8.6-era thread2812/twapi511). So Windows = the known TIP-741 flaw, no + in-runtime cleanup in 9.0.5. STILL TO CHARACTERIZE: linux/WSL (G-105) and the + G-060 guests - on unix the extracted temp file can be unlink()'d while still + mapped, so the expectation there is NO accumulation; verify rather than assume. + (Method: mount a zip containing a built dll, load from it, diff %TEMP%/tmpdir + before+after and after exit; scratch scripts under the session scratchpad.)