: <i>Panic "Buffer Underflow, BUFFER_PADDING not enough"</i> plus 8 other changes
by
.
D 2025-03-04T23:08:50.169
J assignee sebres
J closer nobody
J icomment Nope,\sit\scontinues\s(thus\sreopened)...\r\n\r\nAfter\slong\sresearch\sof\san\sissue\sposted\sin\schat\sby\semiliano\s(350K\slarge\s`gitk`\sover\shuge\srepo\smade\sboom\swith\sBU-panic),\sI\scould\sreduce\sit\sto\sfollowing\sscript,\sthat\s"successfully"\sgenerates\sthe\s"Buffer\sUnderflow"\swith\scurrent\s9.x:\r\n```\r\nset\sf\s[open\s[list\s|\s[info\snameofexecutable]\s<<\s{fconfigure\sstdout\s-translation\sbinary;\sputs\s\\xD6[string\srepeat\s_\s20]}]];\sfconfigure\s$f\s-blocking\s0\s-buffersize\s10\s-translation\slf\s-eofchar\s{};\swhile\s{![string\slength\s[set\sd\s[read\s$f]]]}\s{after\s10};\sputs\s$d;\sclose\s$f\r\n```\r\n\r\nAfter\sall\sit\sis\scrucial\scombi\sof\s-profile\sstrict,\s-blocking\s0\sand\s-buffersize\ssmaller\sthan\sread\scontent.<br/>\r\nIn\sthis\sparticular\scase\sit\sreads\s20\sbytes\swith\sbuffer\s10\sbytes\s(in\scase\sof\s`gitk`\sread\s500K\sby\s4K\sbuffer)\swith\ssingle\snot\sutf-8\schar\sinside:\r\nthe\s"trigger"\sis\s`\\xD6`-char\s(`Ö`\sas\ssingle-byte,\squasi\sin\s"binary"\sor\scp1252\sform),\swhat\sshall\scause\sencoding\serror\sin\sutf-8,\sbut\sit\scauses\sthe\spanic\sinstead.\r\n\r\nI'm\sin,\sbut\sa\sbit\sbusy\sright\snow,\sso\sposting\sit\sfor\sthe\srecord\sand\swhen\ssomeone\scould\sfix\sit\sfaster\sthan\sme.\r\n\r\nP.S.\sby\sthe\sway,\sbecause\sthere\sis\sno\sapplication-\sor\sinterp-wide\soption\sto\sswitch\sdefault\s`-profile`\s(greetings\sto\sall\swith\sthe\sopinion\s"we\swant\sno\ssuch\sglobal\sconfiguration\sfacilities"),\sto\sbe\sable\sto\suse\sapplication\sfurther,\speople\sneed\sto\simplement\sugly\smock-ups\slike\sthis\snow:\r\n```\r\n\s\srename\s::open\s::_mckpd_open\r\n\s\sproc\s::open\sargs\s{\r\n\s\s\s\sset\sch\s[::_mckpd_open\s{*}$args];\schan\sconfigure\s$ch\s-profile\stcl8;\sreturn\s$ch\r\n\s\s}\r\n```\r\n(nice,\sisn't\sit?)
J login sebres
J mimetype text/x-markdown
J priority 7\sHigh
J resolution None
J severity Critical
J status Open
K 73bb42fb3f35cd613af6fcea465e35bbfd352216
U sebres
Z 5afa7ca3a48c41f050ec26b250134c8d