Overview
| Artifact ID: | 143f60663d7866b904726c5034ee5ab6a29ecd8d5387afd658cce9aa086a5117 |
|---|---|
| Ticket: | 3b6b1c4e495f11ad9cf02230579359b72c8ccd73
Tcl 9.0 hangs infinitely |
| User & Date: | pointsman on 2023-06-30 12:08:42 |
Changes
- closedate changed to: "2460126.00604227"
- closer changed to: "pointsman"
- icomment:
After discussing and analysing this further with the support of the nice fellows on the Tclers chat (thanks folks!) it turned out that this is a combination of a coding practice which worked at that time and for the Tcl version aimed for but does not anymore due to Tcl 9 variable resolution changes with another Tcl 9 change (TIP 514). So this is not a bug of the Tcl 9 code base (but a lesson about on what script level patterns to look for while porting script code to Tcl 9.) Let me explain a bit more. Turned out the crucial code is this: [https://core.tcl-lang.org/tcllib/file?udc=1&ln=90-98&ci=tip&name=modules%2Fcrc%2Fcrc32.tcl] That code is evaluated in a namespace. Therefor, with Tcl < 9 the line [https://core.tcl-lang.org/tcllib/file?udc=1&ln=90&ci=tip&name=modules%2Fcrc%2Fcrc32.tcl] resolved the (unprefixed) tcl_platform in the global namespace. Tcl 9 does not do that anymore. Because of this the code branch [https://core.tcl-lang.org/tcllib/file?udc=1&ln=93-97&ci=tip&name=modules%2Fcrc%2Fcrc32.tcl] got evaluated. Then another Tcl 9 changes come into play: TIP 514, making the int() math function not to do truncation any more. That means that the algorithm at that place does not work anymore (but runs infinite until the number get so big that it reaches other limits). The code runs on 8.7 because that still has the "resolve the variable in the global namespace if it doesn't exists in the namespace" behaviour.
- login: "pointsman"
- mimetype: "text/x-fossil-plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"