<i>badly aligned mem allocations?</i> status still Open with 4 other changes
by
.
D 2007-12-17T19:21:06
J icomment \n\nFile\sAdded\s-\s258873:\salloc2.patch\n\nLogged\sIn:\sYES\s\nuser_id=148712\nOriginator:\sYES\n\nAn\salternative\sfix\sfor\sTclStackAlloc\sto\salways\sreturn\s2-word\saligned\smemory\sindependently\sof\swhatever\sTcl_Alloc\sdoes\s(ie,\swithout\slooking\sat\sALLOCALIGN\sor\stouching\sTcl_Alloc)\sis\sattached\sas\salloc2.patch.\n\nLooking\sat\sTclpAlloc\sin\smore\sdetail,\sI\snow\ssee\sthat\sthe\sbug\sis\s"there\sbut\snot\sthere":\sstruct\sBlock\scontains\sa\s(Block\s*)\sand\sa\ssize_t\s-\son\susual\splatforms,\sit\sis\s2-word\swide.\sThe\sALLOCALIGN=8\spadding\sis\sonly\sreally\sfunctional\son\splatforms\swhere\s2\swords\sare\sless\sthan\s8\sbytes\s(ie,\son\s16b\splatforms?);\sotherwise\ssizeof(Block)\sis\s8\son\s32b\sand\s16\son\s64b.\sThe\sblocks\sthemselves\sstart\sat\smultiples\sof\sMINALLOC\s(16\sresp\s32)\saway\sfrom\ssomething\sreturned\sby\smalloc,\sand\sthe\sTcl_Alloc'ed\smemory\sis\scomputed\sin\sBlock2Ptr\sas\s'(char\s*)(blockPtr+1)'.\n\nAll\sof\sthis\smeans\sthat\sthe\salignment\sof\sTcl_Alloc\sis\snot\sactually\sALLOCALIGN=8\son\s64b\splatforms,\sbut\srather\s16.\sSetting\sit\sto\s16\swill\snot\schange\sanything\sin\sTcl_Alloc,\sbut\s"fix"\sthe\s(patched\swith\salloc.patch)\sTclStackAlloc\sand\smake\sthe\sactual\salignment\sof\sTcl_Alloc\sclearer.\n\nFile\sAdded:\salloc2.patch\n
J login msofer
J mimetype text/plain
J username msofer
K 1851832fffffffffffffffffffffffffffffffff
U msofer
Z affb41e807b457e6a553ccd3de43456d