From: <apn...@ya...> - 2025-07-31 05:54:18
|
Sergey, Looking into your question below about why the file system epoch is incremented more often in 9.x (test suite run -> 1300 for 9.0, less than 200 for 8.6), it appears to happen when an interp is created (whether in the same thread or a different one). Creation of a new interp -> search for init.tcl in zipfs -> ScriptLibrarySetup which sets up new encodings path and calls TclpSetInitialEncodings (see bug [fccb9f322f]). This last also results in file system epoch being bumped up. As a separate bug I just logged ([87b69745be]), it also resets the encodings search path. The right fix I think would be to move zipfs discovery and initialization earlier in the interpreter init sequence but interp initialization is quite a convoluted mystery to me, jumping back and forth between script and C with recursive calls to the same functions(s). I am hesitant to mess around with that. As a less risky point fix, I am thinking of changing ScriptLibrarySetup to (a) not overwrite existing state of [encoding dirs] but only add it to it (fix for 87b6) and (b) not bump the file system epoch unless the encoding search paths have changed. What do you (or anyone else who knows this init sequence) think? /Ashok From: Dipl. Ing. Sergey G. Brester via Tcl-Core <tcl...@li...> But the question (3) from my initial mail remains, why it is so flashy in 9.x (but not in 8.x), if that use-after-free is so old and exists there since dozen years? |