<i>GrowStringBuffer and GrowUnicodeBuffer do not check for overflows</i> status still Open with 3 other changes
by
.
D 2023-05-05T13:07:04.876
J icomment The\schanges\sdiscussed\shere\scan\sprobably\sbe\sused\sto\saddress\s[69b4f7eb37],\sat\sleast\sin\snewer\sTcl.\sI\shad\ssimilar\sideas\sthere\sabout\sadjusting\sthe\smemory\sallocation\sgrowth\salgorithm.\sOther\sideas\s(which\sI\sam\snot\sknowledgeable\senough\sto\sknow\sif\sthey\sare\sgood\sones)\smight\sbe\sto\shave\ssome\s<tt>TCL_MAX_GROWTH</tt>\samount,\sor\sto\skeep\strack\sof\slarge\sbuffers\sso\sTcl\scan\sgo\sback\sand\sfree\sunused\smemory\sbefore\strying\smalloc\sagain\s(or\spossibly\sin\sresponse\sto\sa\smemory\spressure\snotification\sfrom\sthe\sOS).\sAnd\swhile\sI\sam\saware\sTcl\swas\smostly\swritten\swhen\scomputers\shad\sfar\sless\sRAM,\smany\sof\sits\smemory\sallocation\spanics\sdo\snot\sseem\sstrictly\snecessary,\sbut\swere\slikely\seasier\sto\simplement\sthan\sreturning\serrors,\sor\sout\sof\sthe\sassumption\sthat\sthe\sstability\sof\sthe\sentire\ssystem\sis\scompromised\sonce\s<tt>malloc()</tt>\sfails.
J login chrstphrchvz
J mimetype text/x-fossil-wiki
K c9663296fd31fbb2fa1ff1cf019b59f432983516
U chrstphrchvz
Z 99a3bda2b0b093d1ba47bef7bdbd72ed