Overview
| Artifact ID: | afdaf05f0ea67e2df306a89865dd90d555ff64ca |
|---|---|
| Ticket: | 3067036fffffffffffffffffffffffffffffffff
Appending to 0-length byte array causes busy loop. |
| User & Date: | sbron on 2010-09-15 17:52:43 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed to:
The code below goes into a busy loop with 100% cpu usage: set f [open /dev/null] chan configure $f -blocking 0 -translation binary set str [read $f 2] append str [binary format a* foo] The problem is in TclAppendBytesToByteArray(). This function tries to calculate the needed memory by doubling the currently allocated space until it is big enough. That method fails miserably when starting with an allocated space of size 0, as is the case in the code above.
- foundin changed to: "obsolete: 8.6b1.1"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "sbron"
- subsystem changed to: "12. ByteArray Object"
- title changed to: "Appending to 0-length byte array causes busy loop."
- type changed to: "Bug"