Overview
| Artifact ID: | 810e8383ad38109289d7eec28dcc9efb690f68c71ad61f8bd70f81e72a845c17 |
|---|---|
| Ticket: | b6afa337376342ff91953f200db89ff4ff4f5fe6
signed integer overflow in TclInitStringRep() macro |
| User & Date: | chrstphrchvz on 2022-02-19 13:49:20 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
Example script and corresponding output with UBSan error (<tt>-fsanitize=signed-integer-overflow</tt>, excludes any previously reported errors): <blockquote><pre> proc p {} { set a [string repeat [string repeat a 1023] 1049601] set a2 [string cat a $a $a] return [string toupper $a2] } set x [p] </pre> <pre> <span style="font-weight:bold">tcl/generic/tclExecute.c:5520:6:<span style="color:firebrick"> runtime error: </span>signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'</span> </pre>(tclsh eventually exited normally)</blockquote> Can be prevented with same approach used in [a03e9793d4]; see attached patch. - foundin changed to: "core-8-6-branch"
- is_private changed to: "0"
- login: "chrstphrchvz"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "chrstphrchvz"
- subsystem changed to: "10. Objects"
- title changed to:
signed integer overflow in TclInitStringRep() macro
- type changed to: "Patch"