Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2005-11-21
01:37 • Ticket [1091431fff] Tcl_InitStubs failure crashes wish status still Closed w... artifact: 710279d2b5 user: jenglish
01:37 • Add attachment tcl-stublib.patch to ticket [1091431fffffffff|1091431fff... artifact: e5ed1cb2cd user: jenglish
01:37 • Ticket [1091431fff] Tcl_InitStubs failure crashes wish status still Closed w... artifact: f5e33f356e user: jenglish
01:37 • Ticket [1091431fff]: 5 changes artifact: 17bd2cc973 user: jenglish
01:37 • Closed ticket [1091431fff]. artifact: ec4db66d87 user: jenglish
2004-12-30
06:10 • Ticket [1091431fff]: 1 change artifact: 95ff8e4aa8 user: kennykb
2004-12-29
09:21 • Ticket [1091431fff]: 4 changes artifact: 3bfab2d128 user: dgp
2004-12-27
03:37 • Ticket [1091431fff]: 4 changes artifact: 66cf991526 user: jenglish
03:37 • Add attachment tcl-stublib.patch to ticket [1091431fffffffff|1091431fff... artifact: 7800201aca user: jenglish
03:37 • Ticket [1091431fff] Tcl_InitStubs failure crashes wish status still Open wit... artifact: ac7009c747 user: jenglish
2004-12-26
20:12 • New ticket [1091431fff]. artifact: 2d23be55b7 user: jenglish

Tcl_InitStubs failure crashes wish

Closed / Fixed1091431fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 21 years ago
Descriptionplain2004-12-26 20:12:58
On Linux and possibly other ELF-based systems,  the
global variable "tclStubsPtr" defined in tclStubLib.c
may be shared by all extensions.  That is, even though
each shared library includes its own copy of the
variable, the runtime loader will merge all copies into
a single location.

This causes serious problems if Tcl_InitStubs() ever
fails.  For example, if an extension that calls
Tcl_InitStubs(..., "8.5", ...) is loaded into an 8.4
wish, then Tcl_InitStubs() sets tclStubsPtr to NULL,
causing wish to immediately crash (if, as is the usual
case, Tk was compiled with -DUSE_TCL_STUBS).
jenglishplain2004-12-27 03:37:09
Logged In: YES 
user_id=68433

Attached patch to generic/tclStubLib.c attempts to fix the
problem.  Unfortunately it can't really work without
retroactively patching all the existing copies of wish8.4;
when an extension that calls Tcl_InitStubs() is loaded into
wish8.4, the runtime loader will use the copy of
Tcl_InitStubs from libtk8.4.so, not the one from the
extensions' library.
jenglishplain2004-12-27 03:37:11
File Added - 113585: tcl-stublib.patch
dgpplain2004-12-29 09:21:15
Logged In: YES 
user_id=80530


Is Feature Request 540378 relevant here?
kennykb Ticket [1091431fff]: 1 change [History diff]2004-12-30 06:10:30
jenglish Closed ticket [1091431fff]. [History diff]2005-11-21 01:37:34
jenglishplain2005-11-21 01:37:35
Logged In: YES 
user_id=68433

Committing refreshed patch to CVS HEAD and backported to
core-8-4 branch, so at least this will be fixed with 8.4.12.

Also removed some TCL_STORAGE_CLASS monkey business that had
no effect.
jenglish Ticket [1091431fff]: 2 changes [History diff]2005-11-21 01:37:37
jenglishplain2005-11-21 01:37:40
File Added - 156958: tcl-stublib.patch
Log in (anonymous is fine) to add a comment.

Attachments: