Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2022-12-06
16:36 • Closed ticket [27a4c11c68]: Mechanism needed to avoid loading Tcl 8 packages i... artifact: cd56f0023b user: jan.nijtmans
2019-02-14
17:43 • Ticket [27a4c11c68]: 3 changes artifact: c4b33e7273 user: dgp
17:39 • Ticket [27a4c11c68]: 3 changes artifact: 10b63e4685 user: dgp
2019-02-10
15:11 • Pending ticket [27a4c11c68]. artifact: a97e58544a user: jan.nijtmans
2019-02-06
18:24 • Ticket [27a4c11c68]: 4 changes artifact: a38b254e51 user: dgp
18:24 • Ticket [27a4c11c68]: 3 changes artifact: b646e7a266 user: dgp
18:01 • Ticket [27a4c11c68]: 3 changes artifact: 22ec378a04 user: dgp
17:46 • Ticket [27a4c11c68]: 3 changes artifact: be865377b3 user: dgp
16:40 • Ticket [27a4c11c68]: 5 changes artifact: 66b5ddc614 user: dgp
16:12 • Ticket [27a4c11c68]: 3 changes artifact: 12849a64fb user: dgp
16:12 • New ticket [27a4c11c68]. artifact: 21e484b0b1 user: dgp

Mechanism needed to avoid [load]ing Tcl 8 packages into Tcl 9

Closed / Fixed27a4c11c6861cd63c99fb3e576d4d069fdc6e424Created 8 years agoUpdated 4 years ago
Descriptionplain2019-02-06 16:12:26
Maybe this is known since the branch is still a work in progress, but running the test suite on the branch tip-502-for-9 yields a segfault in the test file httpcookie.test just after test http-cookiejar-2.14 passes.
dgp Ticket [27a4c11c68]: 3 changes [History diff]2019-02-06 16:12:38
dgpplain2019-02-06 16:40:52
Sorry about the misdirection. Looks like this segfault is on the trunk (Tcl 9).

It showed up sometime around Jan 24.

It's only on the tip-502-for-9 branch because it got merged there from trunk.
dgpplain2019-02-06 17:46:51
Ignore that Jan 24 claim.

Something stranger is going on. working.....
dgpplain2019-02-06 18:01:22
A series of tests now shows the segfault happening all the way back to 2018-11-13 when the httpcookie.test file first appeared on the trunk branch.

Since I have no recollection of this as the development came in, there's something else going on here.
dgpplain2019-02-06 18:24:05
The trouble is that the tests in httpcookie.test need the package sqlite3.

In an environment where an installed sqlite3 package built against Tcl 8 headers gets found and loaded instead of one built against Tcl 9 headers, it will crash.

We MUST solve this problem before we can make even an alpha release of Tcl 9.
dgp Ticket [27a4c11c68]: 4 changes [History diff]2019-02-06 18:24:58
jan.nijtmanswiki2019-02-10 15:11:42

Actually, I think the crash was due to a problem in tclsqlite, failing to test for the stubs mechanism compatibility. Should be fixed now in tclsqlite 3.27.1: http://cyqlite.sourceforge.net/cgi-bin/sqlite/info/0be4b366eea05104

dgpplain2019-02-14 17:39:47
What the hell?

You mean instead of just calling Tcl_InitStubs(), the sqlite3 extension
hacks into the interp internals for itself?!

All this encapsulation breaking IS NOT WORTH IT!!!!!!!


Stop breaking interfaces for pittances. The fragility will kill us.
dgpplain2019-02-14 17:43:43
That said, the Title remains true.

In the journey from Tcl 8 to Tcl 9 we will have systems where binary packages able to [load] into Tcl 8 (but not 9!) and binary packages able to [load]
into Tcl 9 (but not 8!) are going to both be installed.

We need some mechanism or convention or something to see that only the right
major interps and the right subset of installed packages are attempted to
join together.

A tidy error message from a failed Tcl_InitStubs() call is indeed better
than a crash, but better still is to create rules for working systems where
failing pairs are not joined in the first place.
jan.nijtmanswiki2022-12-06 16:36:12

See TIP #595

Log in (anonymous is fine) to add a comment.