Overview
| Artifact ID: | 4f2dd9a4ef04eced061cc2555561958b05d2e79357251236455fdecd99c0e53b |
|---|---|
| Ticket: | aaa84fbbc59fc039788c080a8cd32d2f73316db9
zipfs info on mountpoint of executable returns zero offset in field 4 |
| User & Date: | juliannoble2 on 2024-10-14 15:46:42 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-plain"
- comment changed to:
Documentation for tcl9 zipfs info says: As a special case, querying the mount point gives the start of the zip data as the offset in (4), which can be used to truncate the zip information from an executable. Tested on some of my own windows builds and also on some beta tcl9s from magicsplat. zipfsinfo //zipfs:/app tclsh90.exe 0 0 0 Confirmed with Schelte in chat. Sorry to harp on about offsets - but I think it's important. If you mount a zip that has a tcl script prefix - it shows zero for field 4 if the offsets are relative to the file (which is what zipfs mkimg seems to have changed to do in 2021) If you just create a zip which is catted (ie no offset adjustments therefore offsets are relative to the archive) - you will get the offset info in field 4 to aid in determining where the exe/zip split occurs. I believe this is a rather difficult problem to determine the split if you use file based offsets - as you probably have to scan for pk\3\4 (local file header) entries - which could conceivably get false positives from in the exe/script data. Also - there can legitimately be file entries which aren't pointed to by the CDR so you can't just enumerate all files and look for the lowest offset - though at least it can get you in the ballpark If it was kept as simple unadjusted offsets - it's just a matter of doing a simple calculation - which tclZipfs.c already does. Trying not to add too much noise around this - but the calculation of the offset as zero as returned by 'zipfs info' might explain why in ticket https://core.tcl-lang.org/tcl/tktview/fc65ff1b663fd16e7582 .. the exe was missing from zipfs mkimg output. It's possibly an interaction with using 'zip -A' to change offsets to file based. It's my guess that the fix in that ticket to use file-based offsets broke zipfs info - and leaves us with the harder problem of scanning possibly large exes and zips for the split.
- is_private changed to: "0"
- login: "juliannoble2"
- priority changed to: "5 Medium"
- private_contact changed to: "957fdfcd8744611e3fe1f4896c7538b1d9bf47b2"
- resolution changed to: "None"
- severity changed to: "Severe"
- status changed to: "Open"
- submitter changed to: "juliannoble2"
- subsystem changed to: "- New Builtin Commands"
- title changed to:
zipfs info on mountpoint of executable returns zero offset in field 4
- type changed to: "Bug"