<i>valgrind reports uninitialized memory access running the test suite</i> status still Closed with 5 other changes
by
.
D 2026-03-12T13:13:23.338
J closedate 2461112.0509645604
J closer sebres
J icomment >\sYou\sthink\sthis\swould\sbe\sa\svalid\s(future)\soptimization.\sI\sthink\sit\swon't\sbe\sa\svalid\soptimization\sat\sall\r\n\r\nIt\sis\snot\sabout\s"think",\sit\sis\sabout\s"know".\sBecause\sI\sknow\sthis.\r\n\r\nThe\scompiler\sis\sentitled\sto\sassume\sthat\san\sobject\sof\stype\sstruct\soccupies\sits\sfull\s`sizeof(struct)`\sin\smemory.\sThat's\sit.\r\n\r\n>\sit\swould\sdo\sread\saccess\sof\suninitialized\spadding\sbytes\r\n\r\nJan,\sthis\ssentence\sdoesn't\smake\ssense\sat\sall.\s\r\nWhy\sshall\sthe\spadding\sbe\sinitialized?\sAnd\swhat\sdo\syou\sthink\sthe\spadding\sis\sfor?\r\nThe\salignment\s(for\sfaster\sCPU\saccess)\sis\sonly\sone\spurpose\s(and\salmost\sof\slittle\simportance)...<br/>\r\nThe\smore\spurposes\sare:\r\n\s\s-\sto\sallow\sCPUs\sfaster\sfetch\sdata\sfrom\smemory\sin\sfixed-size\schunks\sknown\sas\sthe\s"word\ssize"\s(e.g.\s8\sbytes\sat\sa\stime).\r\n\s\s-\shardware\scompatibility,\ssince\son\ssome\sarchitectures\saccessing\sunaligned\sdata\sis\scompletely\sdisallowed\sand\scan\scause\sa\shardware\sexception\sor\scrash.\sBut\sin\sthe\ssame\sway\sthere\sare\sarchitectures\swhere\sthe\saccessing\sof\sblocks\ssmaller\sthan\s"word\ssize"\sis\simpossible.\r\n\r\nApropos\salignment,\swho\sguarantees\sthat\sthe\sblock\sretrieved\sby<br/>\s`(ScriptLimitCallbackKey\s*)Tcl_GetHashKey(&iPtr->limit.callbacks,\shashPtr);`<br/>\sis\sproperly\saligned?\sIf\sfor\sinstance\sthe\sinternal\shandling\sof\sallocation\sin\shash\stable\schanges\stomorrow\sand\sthe\sbuckets\swill\sbe\sallocated\sas\s10*12,\se.\sg.\sas\sa\schunk\swith\s10\seach\s12\sbytes\sblocks,\sso\severy\s2nd\sblock\sin\ssuch\sa\schunk\sbecomes\smisaligned.\r\n\r\nAgain,\syou\sdisagree\snot\swith\sme,\sbut\swith\sC-standard.\sOr\srather\swith\sthe\sfact\sthat\ssuch\scast\scan\sbe\sconsidered\sas\san\sUB.\s\r\nParticularly\swith\sthis\s3\sparagraphs\sin\sthe\sC-standard:\r\n\r\n1.\sPointer\sConversion\sand\sAlignment\s(6.3.2.3,\sp7)\r\n2.\sAccessing\sBeyond\sObject\sBoundaries\s(6.5.6,\sp8)\r\n3.\sStrict\sAliasing\s(6.5,\sp7)\r\n\r\nSome\sUBs\smay\sworks\syears\still\ssome\sdays\sthey'd\sstop\sto\swork.
J login sebres
J mimetype text/x-markdown
K f7495f63c01ea80069198ac183e1e0cc8873dabe
U sebres
Z 2e80365344db3831e79b3e24cd720351