Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2013-12-12
20:53 • Closed ticket [27ef2056e8]: string repeat overflow fail plus 7 other chang... artifact: 8d4e8e609b user: dgp
20:25 • Ticket [27ef2056e8]: 3 changes artifact: 8d7f12ab15 user: dgp
20:16 • Ticket [27ef2056e8]: 3 changes artifact: 8a899c7562 user: dgp
19:58 • New ticket [27ef2056e8]. artifact: 01b2396285 user: dgp

[string repeat] overflow fail

Closed / Duplicate27ef2056e8a87e82a43f94796e68558da85abcf3Created 13 years agoUpdated 13 years ago
Descriptionplain2013-12-12 19:58:33
% string length [string repeat a [expr 1<<31]]
0


[string repeat] implementation does have overflow
checking code, but it must be failing in at least
this edge case.
dgpplain2013-12-12 20:16:32
This is a variation on

% string length [string repeat a -5]
0

Have to consider whether negative argument
for "count" argument of [string repeat]
ought to continue to produce the empty string,
or ought to be raising an error.
dgpplain2013-12-12 20:25:05
This is a Dup / re-emergence of Tcl Bug 2561746/  WTF?
dgpplain2013-12-12 20:53:18
This is an exact Dup of 2561746.

See that ticket for an explanation why this
has been considered "not a bug".

If we wish to reconsider that judgment, let's
re-open it there.
Log in (anonymous is fine) to add a comment.