Tcl Source Code

View Ticket
Login
Ticket UUID: 476537
Title: UpdateStringProc panic when using stubs
Type: Bug Version: obsolete: 8.4a4
Submitter: dgp Created on: 2001-10-30 21:43:57
Subsystem: 39. Package Manager Assigned To: dgp
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2002-02-23 05:36:22
Resolution: Fixed Closed By: dgp
    Closed on: 2002-02-22 22:36:22
Description:
A panic about a missing UpdateStringProc
has been reported on AIX systems.  See

http://groups.google.com/groups?hl=en&selm=fec9a0b3.0110291044.5480155c%40posting.google.com

I'm still working on understanding the
comment on line 189 of generic/tclPkg.c,
but the code there is clearly broken:

    /* ...
     * Detect this situation by checking that this
library has been correctly
     * initialised. If it has not been then return
immediately as nothing will
     * work.
     */

    if (!tclEmptyStringRep) {
        Tcl_AppendResult(interp, "Cannot load package
\"", name,
                "\" in standalone executable: This
package is not ",
                "compiled with stub support", NULL);
        return NULL;
    }

Since "nothing will work", the routine
Tcl_AppendResult() should not be called,
because, as promised, it will not work!
It panics when tclEmptyStrinRep is not initialized.

Similar code is in Tcl_PkgPresentEx().
User Comments: dgp added on 2002-02-23 05:36:21:
Logged In: YES 
user_id=80530

only way to get this tested is to commit.
doing so now.

dgp added on 2002-02-23 05:34:28:

File Deleted - 15657:

dgp added on 2002-02-23 05:34:27:

File Added - 18266: stubcrash.patch

Logged In: YES 
user_id=80530

here's an updated patch.

dgp added on 2002-01-08 06:32:00:

File Added - 15657: stubcrash.patch

dgp added on 2002-01-08 06:31:59:
Logged In: YES 
user_id=80530

Here's a patch that *may* fix the problem.
I can't test though, because I don't have
a test package that demonstrates the bug.
Writing to Guy Mason, who originally reported
the trouble on c.l.t. to see if he can test.

Attachments: