Overview
| Artifact ID: | a1af59ef51805b7d5f265754ea9a265ff79bed9eef08ef35c27e208af883f017 |
|---|---|
| Ticket: | 67d5f75c36cbada6cf2361aaf49cffa61281143b
[$interp eval $lambda] after [eval $lambda] or vice versa fails |
| User & Date: | apnadkarni on 2024-09-30 17:49:32 |
Changes
- icomment:
Breakage appears to be from [here](https://core.tcl-lang.org/tcl/file?ci=tip&name=generic/tclProc.c&ln=2643-2644). The sample code is actually generating an error with an empty error message. Basically the lambda internal rep remembers the interpreter that compiled it. In 8.6, if the internal rep was compiled in a different interpreter than the current one, it would be recompiled and life would go on. That was changed (not sure inadvertently or not) to return a NULL indicating an error instead (without setting the interp result to an error message which is another buglet). The change happened in this [TIP 445](https://core.tcl-lang.org/tcl/info/bfd27f785778b32b) merge. The prior [commit](https://core.tcl-lang.org/tcl/info/5f51fd5a97866eb0) works as in 8.6. One fix would be to revert to 8.6 behavior and recompile on a change in interps. I'm not sure though whether the original change was intentional or not, for example to prevent constant recompilation on a lambda TclObj shared between interpreters? Perhaps the intent was such that lambda TclObjs should be duplicated instead?
- login: "apnadkarni"
- mimetype: "text/x-markdown"