.
D 2000-10-26T00:54:24
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s2399\sBug\nVersion:\s8.0p2\nSubmitDate:\s'1999-07-19'\nLastModified:\s'1999-08-05'\nSeverity:\sCRIT\nStatus:\sClosed\nSubmitter:\stechsupp\nChangedBy:\shobbs\nOS:\sOther\nMachine:\sNA\nFixedDate:\s'2000-10-25'\nClosedDate:\s'1999-08-05'\n\n\nName:\nchristopher\scostello\n\nReproducibleScript:\nRun\sany\stcl\sapplication\suntil\smemory\sis\sexhausted.\sIf\sthe\s#defines\sare\n\s\s\s\sset\sto\suse\snormal\smalloc/free,\sthen\sa\sNULL\spointer\swill\sbe\sused\sin\sthe\n\s\s\s\s(multiple)\splaces\sin\sthe\stcl\ssource\swhere\sthe\sresult\sis\snot\schecked.\n\s\s\s\sSince\smemory\sexhaustion\scannot\sin\sprinciple\sbe\sexcluded,\sthis\ssuggests\n\s\s\s\sthat\syour\sdesign\sapproach\smeans\sthat\sone\smust\salways\scompile\swith\n\s\s\s\sTCL_MEM_DEBUG\sor\sUSE_TCLALLOC\sor\srisk\sa\score.\sA\sbetter\ssolution\swould\sbe\n\s\s\s\sto\scheck\sthe\sreturn\svalue\sof\sall\smallocs\sat\sthe\splace\sof\scall,\swhere\sthe\n\s\s\s\saction\sappropriate\sfor\srecovery\sis\sknowable.\n\n\n\nTcl\sdoes\snot\scheck\sagainst\sthe\sreturn\svalues\sof\smallocs\sbecause\nthe\sphilosophy\sis\sthat\sif\syou\sare\sout\sof\smemory,\syou\sare\sscrewed\none\sway\sor\sthe\sother.\s\sTo\sget\sa\sNULL\sand\spanic\s(thus\saborting)\ngives\syou\sjust\sabout\sthe\ssame\sresult.\s\sAdding\sin\sall\sthe\schecks\nwould\sjust\scause\sa\sperformance\shit.\s\n--\s08/05/1999\shobbs
J foundin obsolete:\s8.0p2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 69.\sOther
J title malloc\sreturns\sNULL\sand\scauses\score
J type Bug
K 218198ffffffffffffffffffffffffffffffffff
U nobody
Z 280dadb550dbc067827e539489bf8802