scan %s truncates strings at UINT_MAX
% set s [string repeat x 0x100000000] ; string length $s
4294967296
% string length [scan $s %s]
4294967295
acaa559a27Fix [d4ede611a7] - scan bigdata check-in2023-04-24 14:51:20ce85c34ed2Fix for bug [d4ede611a7] (scan) check-in2023-04-24 10:02:23717c2c72f0Bug [d4ede611a7] (scan) - in progress check-in2023-04-23 03:25:33
Other issues with scan.
Large positional qualifiers.
scan abc {%2147483648$s} -> memory access violation
Large width specifiers are truncated.
% set s [testbigdata string 0x10000000a]; string length $s
4294967306
% scan $s %4294967300s%s x y
2
% string length $y
11
% string length $x
4294967295
Fixed in [acaa559a27].
scan abc {%2147483648$s} crashes on 8.6 and 8.7 as well. Can the fix and scan-19.3 be backported?
The back porting to 8.6/8.7 has relevance to all the "bigdata" tests and fixes, not just this one. In fact it also has relevance to 32-bit Tcl9.
However, these tests and fixes target bugs that are present for arguments with lengths that are valid for the build in question. So for 64-bit builds in Tcl9, 0x100000000 is a valid string / list length and that is what these tests and fixes address.
In particular, tests for lengths that are not supported by the build comprise a different set of tests and are harder to construct. They would be more appropriate for the 8.x series.
Also, given limited time and resources, I personally do not plan on spending any time making the 8.x series robust dealing with large data. I see that time better spent on 9.x.
So, the short answer after a long rationalization :-), no I'm not planning on a back port.
> Can the fix and scan-19.3 be backported? Anyone can implement/propose a backport for this fix to 8.6/8.7.