Overview
| Artifact ID: | 59f69ef9c32e9934f03e77274237eb090cead141df8430a7c1a4ef6bf1719dc8 |
|---|---|
| Ticket: | 73bb42fb3f35cd613af6fcea465e35bbfd352216
Panic "Buffer Underflow, BUFFER_PADDING not enough" |
| User & Date: | sebres on 2025-03-04 23:08:50 |
Changes
- assignee changed to: "sebres"
- closer changed to: "nobody"
- icomment:
Nope, it continues (thus reopened)... After long research of an issue posted in chat by emiliano (350K large `gitk` over huge repo made boom with BU-panic), I could reduce it to following script, that "successfully" generates the "Buffer Underflow" with current 9.x: ``` set f [open [list | [info nameofexecutable] << {fconfigure stdout -translation binary; puts \xD6[string repeat _ 20]}]]; fconfigure $f -blocking 0 -buffersize 10 -translation lf -eofchar {}; while {![string length [set d [read $f]]]} {after 10}; puts $d; close $f ``` After all it is crucial combi of -profile strict, -blocking 0 and -buffersize smaller than read content.<br/> In this particular case it reads 20 bytes with buffer 10 bytes (in case of `gitk` read 500K by 4K buffer) with single not utf-8 char inside: the "trigger" is `\xD6`-char (`Ö` as single-byte, quasi in "binary" or cp1252 form), what shall cause encoding error in utf-8, but it causes the panic instead. I'm in, but a bit busy right now, so posting it for the record and when someone could fix it faster than me. P.S. by the way, because there is no application- or interp-wide option to switch default `-profile` (greetings to all with the opinion "we want no such global configuration facilities"), to be able to use application further, people need to implement ugly mock-ups like this now: ``` rename ::open ::_mckpd_open proc ::open args { set ch [::_mckpd_open {*}$args]; chan configure $ch -profile tcl8; return $ch } ``` (nice, isn't it?) - login: "sebres"
- mimetype: "text/x-markdown"
- priority changed to: "7 High"
- resolution changed to: "None"
- severity changed to: "Critical"
- status changed to: "Open"