Overview
| Artifact ID: | b82cce880b81e71a9c00fa1edddb2c2c5deac6301dbf0a6c36657d8ad42fb6fa |
|---|---|
| Ticket: | 8139aa83a446e62b0102529546efdb4e03285603
tclsh wrong result in string output when built with clang |
| User & Date: | SVIDevelopment on 2023-01-06 14:54:33 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
We built tcl 8.6.11 with clang on Linux and noticed a problem when a string was output to either the console/stdout, a pipe, or a file. This problem does not occur when the same tclsh is compiled with gcc. If a long string (several thousands of characters) is present in a variable, and a new string is formed in double quotes with ten to twenty characters followed by the contents of the variable, then in the output the contents of the variable are overwritten at different locations, the first of which is at position 4096, by the first 12 characters of the combined string. The internal representation of the variable as well as the combined string are not overwritten when checked afterwards. Example: ==== begin example ==== $ ./tclsh8.6 % info patchlevel 8.6.11 % puts [array get ::tcl_platform] osVersion 5.15.0-52-generic pointerSize 8 byteOrder littleEndian threaded 1 machine x86_64 platform unix pathSeparator : os Linux engine Tcl user builder wordSize 8 % set dotString [string repeat . 5000] ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ % set x "XXXXXXXXXXXXXXXXXXXXX$dotString" XXXXXXXXXXXXXXXXXXXXX...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................XXXXXXXXXXXX................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. % string last X $x 20 % ==== end example ==== $ clang --version Ubuntu clang version 14.0.0-1ubuntu1 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.1 LTS Release: 22.04 Codename: jammy
- foundin changed to: "8.6.11"
- is_private changed to: "0"
- login: "SVIDevelopment"
- priority changed to: "5 Medium"
- private_contact changed to: "54be8d2ecf914ca591bab8796ebb920a82b33bb2"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "SVIDevelopment"
- subsystem changed to: "11. Conversions from String"
- title changed to:
tclsh wrong result in string output when built with clang
- type changed to: "Bug"