Skip to content
Tcl Source Code Artifact [23d1fa2d14]
Login

Artifact [23d1fa2d14]

Artifact 23d1fa2d14d0cdd3e83c4c13e431e59b0cc4754c:

Ticket change [23d1fa2d14] - New ticket [218932ffffffffff|218932ffff] <i>Tcl_Alloc behaviour differ from malloc</i>. by nobody on 2000-10-26 01:08:06.
D 2000-10-26T01:08:06
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s2807\sRFE\nVersion:\s8.2\nSubmitDate:\s'1999-09-16'\nLastModified:\s'1999-11-02'\nSeverity:\sMED\nStatus:\sReleased\nSubmitter:\stechsupp\nChangedBy:\shobbs\nOS:\sDigital\sUnix\nOSVersion:\s4.0e\nMachine:\sOther\nFixedDate:\s'1999-11-02'\nFixedInVersion:\s8.2.1\nClosedDate:\s'2000-10-25'\n\n\nName:\nEvelino\sBomitali\n\nCustomShell:\nModification\sto\sTcl_Alloc\n\nComments:\nThe\spatch\sproposed\sis\sbased\son\sthe\sassumption\sthat\sTcl_Alloc\sis\n\s\s\s\ssubstantially\san\senhanced\sversion\sof\smalloc.\sProbably\sthis\sis\sa\sbetter\n\s\s\s\ssolution\scompared\swith\sthe\sprevious\spatch\sproposal.\n\nReproducibleScript:\nThe\sheader\sof\sthe\sfile\stclCkalloc.c\sclaims\sthat\sit\sis\san\sinterface\sto\n\s\s\s\smalloc\sthat\ssupport\ssome\schecking.\sHowever,\sTcl_Alloc\sreturn\san\serror\n\s\s\s\sfor\srequest\sfor\sa\szero\ssize\smemory\swhile\smalloc\sreturn\sa\sNULL\spointer.\n\nObservedBehavior:\nDuring\sexecution\sof\stest\s"scan-3.4"\sin\sthe\sstandard\stest\ssuite,\sa\scall\n\s\s\s\sto\sckalloc\s(and\shence\sTcl_Alloc)\swith\ssize\sequal\sto\szero\sis\smade,\n\s\s\s\sresulting\sin\sa\score\sdump.\n\nPatch:\nThe\ssolution\sI\sam\sproposing\sis\sto\smodify\sTcl_Alloc\ssuch\sthat\sit\sreturn\sa\sNULL\spointer\sif\sthe\ssize\sof\smemory\srequested\sis\szero.\n800c800,803\n<\n---\n>\n>\s\s\s\s\s\s\sif\s(size\s==\s0)\s{\n>\s\s\s\s\s\s\s\s\s\sreturn\sNULL;\n>\s\s\s\s\s\s\s}\n813a817,820\n>\n>\s\s\s\s\s\s\sif\s(size\s==\s0)\s{\n>\s\s\s\s\s\s\s\s\s\sreturn\sNULL;\n>\s\s\s\s\s\s\s}\n\nPatchFiles:\ntclCkalloc.c\n\n\n\nThis\shas\sbeen\schanged\sto\sRFE\sbecause\sthe\sassumption\sis\smore\sof\nan\sRFE,\sas\swe\sdon't\sdefine\sit\sthis\sway.\s\sThis\ssounds\sreasonable,\nso\swe\scould\starget\sit\sfor\s8.3.\s\n--\s09/17/1999\shobbs\nIt\swas\sdecided\sto\sadd\sbetter\shandling\sfor\schecking\son\sthe\sNULL\ncase\sin\s8.2.1,\swhich\ssupports\sboth\sDG-UX,\sAIX\sand\ssimilar\sOSes\nthat\sreturn\sNULL\sfor\smalloc(0).\s\n--\s11/02/1999\shobbs
J foundin obsolete:\s8.2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 69.\sOther
J title Tcl_Alloc\sbehaviour\sdiffer\sfrom\smalloc
J type RFE
K 218932ffffffffffffffffffffffffffffffffff
U nobody
Z 98fa1d746653330b00d80230698fd926