Skip to content
Tcl Source Code Artifact [95bac0ca5f]
Login

Artifact [95bac0ca5f]

Artifact 95bac0ca5f82a0f10d335116e92dd4911bd035a1:

Ticket change [95bac0ca5f] - Ticket [c383ebb5e414458c|c383ebb5e4] <i>&quot;glob -path a&quot; core dumps instead of argument error</i> status still Open with 4 other changes by dah on 2016-06-14 23:48:38.
D 2016-06-14T23:48:38.326
J icomment Ok,\sin\scase\sanyone\sis\sinterested,\sit\sdoesn't\scrash\swhen\scompiled\swith\sgcc\sdue\sto\san\soptimization\swhere\sit\sreuses\slocal\svariable\sstorage.\sThere\sis\sa\sDString\s"pref"\sinitialization\sdone\sbefore\sthe\scode\sblock\striggering\sthe\scrash\swith\sMSVC,\sand\sthat\ssame\sstorage\sis\sreused\slater\sfor\sDString\s"str"\s(with\sgcc).\r\n\r\nBelow\sis\sessentially\swhat\sis\shappening\sand\sshouldn't\scrash\swith\sgcc\seither,\sbut\sdoes\swith\sMSVC:\r\n\r\n#include\s<tcl.h>\r\n#include\s<stdio.h>\r\nint\smain\s(int\sargc,\schar\s*argv[])\s{\r\n\s\s\s\s\s\s\s\sif\s(1)\s{\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sTcl_DString\sone;\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sTcl_DStringInit(&one);\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sTcl_DStringFree(&one);\r\n\s\s\s\s\s\s\s\s}\r\n\s\s\s\s\s\s\s\sif\s(2)\s{\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s/*\sShould\scrash,\sbut\sgcc\ssaves\sthe\sday!\stwo\s->\sone\s*/\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sTcl_DString\stwo;\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sTcl_DStringFree(&two);\r\n\s\s\s\s\s\s\s\s}\r\n}\r\n\r\n\r\nThis\sisn't\sa\sWindows\sonly\sbug,\sI\ssuspect\sit\swill\smanifest\sitself\swith\sother\scompilers.
J login dah
J mimetype text/plain
J username dah
K c383ebb5e414458cd386e6016e59f693e3840e81
U dah
Z 70f12d0fa9e8393f028158699712e759