Skip to content
Tcl Source Code Artifact [5128228f8e]
Login

Artifact [5128228f8e]

Artifact 5128228f8ef3960fbc4aad6b1fa1a8481eb5b6e120277a03bfc69a5bce6b0c87:

Ticket change [5128228f8e] - Ticket [f7495f63c01ea800|f7495f63c0] <i>valgrind reports uninitialized memory access running the test suite</i> status still Closed with 5 other changes by jan.nijtmans on 2026-03-12 07:57:42.
D 2026-03-12T07:57:42.669
J closedate 2461111.8317438541
J closer jan.nijtmans
J icomment Well,\sjust\sfor\sthe\sfun,\sI\schecked\sthe\sassembler\sgenerated\s(both\swith\sgcc\sand\sclang\son\sARM64,\smaximum\soptimization\s-O3).\sIt\slooked\slike:\r\n<pre>\r\n\s\s\s\s\s\s\s\smov\s\s\s\s\sx1,\sx0\r\n\s\s\s\s\s\s\s\sldr\s\s\s\s\sx0,\s[x0]\r\n\s\s\s\s\s\s\s\sldr\s\s\s\s\sw1,\s[x1,\s8]\r\n\s\s\s\s\s\s\s\sb\s\s\s\s\s\s\sTcl_LimitRemoveHandler(void*,\sint)\r\n</pre>\r\nConclusion:\sthe\soptimization\syou\ssuggest,\swhich\sI\sdon't\sthink\sis\svalid,\sisn't\sdone\sby\seither\sgcc\sor\sclang.\sIf\s-\sfor\sthe\sfun\s-\sthe\stype\sof\s"type"\sis\schanged\sto\sptrdiff,\sI\sget:\r\n<pre>\r\n\s\s\s\s\s\s\s\sldp\s\s\s\s\sx0,\sx1,\s[x0]\r\n\s\s\s\s\s\s\s\sb\s\s\s\s\s\s\sTcl_LimitRemoveHandler(void*,\slong)\r\n</pre>\r\nso\sthe\scompiler\sknows\sthe\sldp\sinstruction.\r\n\r\nI\sdid\sanother\sexperiment,\sforcing\s64-bit\saccess\sin\sthis\sexact\splace.\sThe\sresult\swas\sa\scrash\sin\stestcase\sinterp-34.7.\sSo\swhenever\sa\scompiler\sdoes\sthis\s(in\smy\sview)\sinvalid\soptimization,\swe\shave\sa\stestcase\sfor\sit,\swhich\striggers\sconsistently.\sI'm\ssure\sthat,\swhenever\sa\scompiler\sintroduces\sthis\soptimization,\sTcl\swill\snot\sbe\sthe\sonly\sproject\sbroken.\s(It\swould\snot\sbe\sthe\sfirst\stime\sthis\shappens)
J login jan.nijtmans
J mimetype text/x-fossil-wiki
K f7495f63c01ea80069198ac183e1e0cc8873dabe
U jan.nijtmans
Z 885446b845a35e39af5839dcce97d313