Tcl Library Source Code

Check-in [1fb1b957bd]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix [7bd2d439ca]: with tcllibc on Tcl 9, crc32 of data over one chunk (4 KiB for files) failed where C long is 32 bits (Windows): Crc32_c returns a negative value and Crc32Update stored it unmasked, which Tcl 9 rejects as the next seed. Mask the running sum. Also clean up the token and close the file when crc32 -filename fails. Test with a mock of the 32-bit C behaviour.
Downloads: See separate download page
Timelines: family | ancestors | crc32-critcl-negative-sum
Files: files | file ages | folders
SHA3-256: 1fb1b957bde4d1799bd22d0280eed36b6f1fa2c3a572584b5e844d98f1c995dd
User & Date: serhiy.storchaka 2026-11-15 13:24:33.935
Context
2026-11-15
13:24
Fix [7bd2d439ca]: with tcllibc on Tcl 9, crc32 of data over one chunk (4 KiB for files) failed where C long is 32 bits (Windows): Crc32_c returns a negative value and Crc32Update stored it unmasked, which Tcl 9 rejects as the next seed. Mask the running sum. Also clean up the token and close the file when crc32 -filename fails. Test with a mock of the 32-bit C behaviour. leaf check-in: 1fb1b957bd user: serhiy.storchaka tags: crc32-critcl-negative-sum
2026-11-13
19:34
Fix 8.6 critcl build check-in: adeef82ca0 user: pbrooks tags: trunk, main
Changes
Unified Diff Side-by-Side Diff Patch
Changes to modules/crc/crc32.tcl.
Changes to modules/crc/crc32.test.