View Ticket
Not logged in
2023-04-27
13:56 Ticket [d4ede611a7] scan %s truncates strings at UINT_MAX status still Closed with 5 other changes artifact: 63f6e18975 user: jan.nijtmans
13:47 Ticket [d4ede611a7]: 5 changes artifact: daca82a33a user: apnadkarni
07:16 Ticket [ab123cfd3d] ValidateFormat(): signed integer overflow status still Open with 4 other changes artifact: 2adb0fc3d3 user: chrstphrchvz
07:10 Ticket [d4ede611a7] scan %s truncates strings at UINT_MAX status still Closed with 5 other changes artifact: af150b5d84 user: chrstphrchvz
2023-04-24
14:52 Closed ticket [d4ede611a7]. artifact: 1e51d5fc46 user: apnadkarni
14:51
Fix [d4ede611a7] - scan bigdata check-in: acaa559a27 user: apnadkarni tags: trunk, main
10:02
Fix for bug [d4ede611a7] (scan) check-in: ce85c34ed2 user: apnadkarni tags: bug-d4ede611a7
2023-04-23
03:25
Bug [d4ede611a7] (scan) - in progress check-in: 717c2c72f0 user: apnadkarni tags: bug-d4ede611a7
2023-04-22
18:00 Ticket [d4ede611a7] scan %s truncates strings at UINT_MAX status still Open with 3 other changes artifact: a054ea6b05 user: apnadkarni
2023-04-12
16:17 Ticket [d4ede611a7]: 3 changes artifact: e26943061d user: apnadkarni
2023-04-09
23:50 New ticket [d4ede611a7]. artifact: a47396a4c1 user: apnadkarni

Ticket UUID: d4ede611a7a7c802d7c5b42c93dded85d41b7184
Title: scan %s truncates strings at UINT_MAX
Type: Bug Version: 9.0
Submitter: apnadkarni Created on: 2023-04-09 23:50:16
Subsystem: 18. Commands M-Z Assigned To: apnadkarni
Priority: 5 Medium Severity: Important
Status: Closed Last Modified: 2023-04-27 13:56:49
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2023-04-27 13:56:49
Description:
```
% set s [string repeat x 0x100000000] ; string length $s
4294967296
% string length [scan $s %s]
4294967295
```
User Comments: jan.nijtmans added on 2023-04-27 13:56:49:
> Can the fix and scan-19.3 be backported?

Anyone can implement/propose a backport for this fix to 8.6/8.7.

apnadkarni added on 2023-04-27 13:47:21:
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.

chrstphrchvz added on 2023-04-27 07:10:08:

scan abc {%2147483648$s} crashes on 8.6 and 8.7 as well. Can the fix and scan-19.3 be backported?


apnadkarni added on 2023-04-24 14:52:43:
Fixed in [acaa559a27].

apnadkarni added on 2023-04-22 18:00:34:
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
```