Overview
| Artifact ID: | aa725b5db4a546bfae9d9f8250ae9afcbad08372 |
|---|---|
| Ticket: | 3588687fffffffffffffffffffffffffffffffff
Tcl_InitStubs() Broken As Designed |
| User & Date: | dgp on 2012-12-07 21:17:26 |
Changes
- icomment:
Ok, you're just repeating my starting point. The routine Tcl_InitStubs() and therefore all deployed binary stubs-enabled extensions -- the ones linked against the "versioned stubs lib" -- suffer from a fundamentally broken design. If any of them passed arguments requesting or accepting "Tcl 9", then those deployed, binaries are going to crash if they are [load]ed into novem. It's ugly and it's broken, but we can't turn back time. This was botched, and we're going to suffer for that botch. All we can do is get a fixed unversioned stubs library out and people started using it before Tcl 9 loading attempts get widespread. If we really must must must do something that will allows any old foo.so linked to a versioned stubs library that's been lying around untouched to [load] into Tcl 9 and not crash, then the only solution is to change TCL_STUB_MAGIC in Tcl 9 (for all platforms, which I will demonstrate). Then the [load] will not crash, but will instead generate the error message: "This interpreter does not support stubs-enabled extensions." and as a consequence, those new extensions linked to the new unversioned stubs library would be unable to generate any better error message than: "interpreter uses an incompatible stubs mechanism" Consider, though, which foo.so are going to crash. Only those which passed a 'version" string argument that accepted a Tcl 9 interp. I submit that no one has done this, other than folks like us who are probing and demonstrating the brokenness if Tcl_InitStubs(). So, we would be sacrificing the ability to produce more meaningful error messages like "version conflict for package "Tcl": have 9.0a0, need 8" for people actively making extensions today, using the latest tools and advice for the sake of preventing crashes in foo.so that do not exist outside the labs of torture testers like us. I prefer that we keep TCL_STUBS_MAGIC unchanged. Get better error messages. And if any of those mythical foo.so appear, then they crash. Sorry. We limped along with a misdesigned Tcl_InitStubs for a decade, and that's the pain.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"