Skip to content
Tcl Source Code View Ticket
Login

View Ticket

tclsh8.2 core dumps on exit

Closed / Fixed218966ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:08:42
OriginalBugID: 3350 Bug
Version: 8.2.1
SubmitDate: '1999-11-05'
LastModified: '1999-12-03'
Severity: SER
Status: Released
Submitter: techsupp
ChangedBy: hobbs
OS: Other
OSVersion: Dynix-ptx/4.0
FixedDate: '1999-12-03'
FixedInVersion: 8.2.3
ClosedDate: '2000-10-25'


Name:
Jackson McCann

ReproducibleScript:
The fault occurs with a shared library that has been created using swig.
The library works correctly with 8.0.5 but fails in 8.2.1 and 8.2.  The
library wraps several functions for the BEA Tuxedo product.  The library
works as expected until the point where exit is called.
    
The behaviour is consistent.
    
    /users/mccannj/tcl/bin/tclsh8.2
    % load /users/mccannj/swig_test/tuxedo_wrap.so
    % Tuxedo::Tpbegin 0
    1
    % exit
    Memory fault(coredump)

ObservedBehavior:
debug -c core /users/mccannj/tcl/bin/tclsh8.2
    Core image of tclsh8.2 (process p1) created
    CORE FILE
    CORE FILE prog name: tclsh8.2
    CORE FILE args: /users/mccannj/tcl/bin/tclsh8.2 
    Signal: sigsegvFault address: 0xbfc871f0
    Error: Invalid text address 0xbfc871f0
    debug> stack
    Stack Trace for p1, Program tclsh8.2
    [7] _init()[0xbff03848]
    [6] Tcl_ExitObjCmd(dummy=0,interp=0x805073c,objc=1,objv=0x80526a0)
    [tclCmdAH.c@674]
    [5] TclExecuteByteCode(interp=0x805073c,codePtr=0x807b798)
    [tclExecute.c@843]
    [4] Tcl_EvalObjEx(interp=0x805073c,objPtr=0x80588fc,flags=0)
    [tclBasic.c@2698]
    [3] Tcl_RecordAndEvalObj(interp=0x805073c,cmdPtr=0x80588fc,flags=0)
    [tclHistory.c@142]
    [2] Tcl_Main(argc=1,argv=0x80477fc,appInitProc=0x8049aa0)
    [tclMain.c@236]
    [1] main(argc=1,argv=0x80477fc,0x8047804)[tclAppInit.c@83]
    [0] _start()[0x8049a59]
    debug> set %frame 6
    6
    debug> symbols
    Symbols for p1, Program tclsh8.2
    Name                 Location         Line
    dummy                Tcl_ExitObjCmd    661
    interp               Tcl_ExitObjCmd    661
    objc                 Tcl_ExitObjCmd    661
    objv                 Tcl_ExitObjCmd    661
    value                Tcl_ExitObjCmd    661
    debug> p dummy
    0x0
    debug> p interp
    0x805073c
    debug> p *interp
    {
        result=
        freeProc=0x0
        errorLine=1
    }
    debug> p objc
    1
    debug> p objv
    0x80526a0
    debug> p *objv
    0x8074058
    debug> p **objv
    {
        refCount=3
        bytes="exit"
        length=4
        typePtr=0xbff89314
        internalRep={
            longValue=134756576
            doubleValue=6.65786e-316
            otherValuePtr=0x80838e0
            twoPtrValue={
                ptr1=0x80838e0
                ptr2=0x0
            }
        }
    }
    debug> p value
    0
    debug> set %frame 7
    7
    debug> symbols
    Symbols for p1, Program tclsh8.2
    Name                 Location         Line
    debug

DesiredBehavior:
No core dump.



This is likely due to the change in unloading, where a DLL is
unloaded before Tcl exits.  If exit handlers were not specifically
created, Tcl can want to make calls to certain destructor funcs
that are no longer availabe because the DLL is already unloaded. 
-- 11/08/1999 hobbs
8.2.3 no longer unloads DLLs on exit (not the best solution,
but works), and 8.3 should have a mechanism whereby users of
DLLs that behave poorly on exit can specify some sort of
-nounload to the load command. 
-- 12/03/1999 hobbs
welch Closed ticket [218966ffff]. [History diff]2000-10-26 08:32:16
dgp Ticket [218966ffff]: 3 changes [History diff]2001-04-19 04:17:05
Log in (anonymous is fine) to add a comment.