Skip to content
Tcl Source Code Artifact [ec0c656305]
Login

Artifact [ec0c656305]

Artifact ec0c656305b0cb7893c67b3c914213cfc4658ea0:

Ticket change [ec0c656305] - Ticket [868489ffffffffff|868489ffff] <i>Incorrect promotion of int to wide</i> status still Open with 4 other changes by kennykb on 2004-04-22 02:25:37.
D 2004-04-22T02:25:37
J icomment \n\nFile\sAdded\s-\s84569:\s868489.patch\n\nLogged\sIn:\sYES\s\nuser_id=99768\n\nIt\soccurs\sto\sme\sthat\sthe\seasiest\sway\sto\smark\sthat\sthe\nannoying\soverflow\shas\soccurred\sis\ssimply\sto\smake\sit\sa\nwide\sinteger\sinstead\sof\san\sordinary\sone.\n\nThe\sattached\spatch\sdoes\sthe\sfollowing:\n\nMakes\sTcl_GetIntFromObj\sand\sTcl_GetLongFromObj\ncheck\sfor\stclWideIntType\sas\swell\sas\stclIntType,\sand\sdo\ndirect\sconversion\sof\sthe\sintenal\srep\sfrom\swide\sto\sint\n(with\sa\srange\scheck).\s\sAlso\schanges\sthe\sconversion\sfrom\nstring\sto\sa\snew\sSetIntOrWideFromAny.\n\nThe\snew\sSetIntOrWideFromAny\sis\sjust\slike\sthe\sold\nSetIntFromAny\sexcept\sthat\sit\schecks\sfor\sinteger\soverflow\nand\suses\sa\stclWideIntType\sinstead\sof\sa\stclIntType\nfor\svalues\sthat\sdon't\sfit\sin\sa\s'long'\s-\savoiding\sinconsistent\ninternal\sreps.\n\nThe\sexisting\sSetIntFromAny\shas\sits\srange\schecks\stightened\nto\savoid\ssetting\san\sinternal\srepresentation\sthat\sis\ninconsistent\swith\sthe\sstring\srep\s(an\serror\sis\sthrown\sinstead).\n\nThere\sare\spotential\sincompatibilities\shere\sbecause\sof\sthe\ntightened\srange\sin\sSetIntFromAny\sand\sthe\sfact\sthat\nTcl_GetIntFromObj\sis\sno\slonger\sguaranteed\sto\sleave\sa\nspecific\sinternal\srepresentation.\s\sIt\sis\sarguable\sthat\sany\ncode\sthat\sruns\safoul\sof\seither\sincompatibility\sis\sbuggy\nanyway.\n\nNew\stest\scases\sprovided\sfor\sthe\sobvious\sproblem\sspots.\n\n\n\n
J login kennykb
J mimetype text/plain
J username kennykb
K 868489ffffffffffffffffffffffffffffffffff
U kennykb
Z f70acb608dd2c536b6c447c7ef690ee0