Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d0107a6b7d1f9605488f10809dd652fa8fe1230f
Ticket: 218280ffffffffffffffffffffffffffffffffff
when loading C lib; i get core dump
User & Date: nobody on 2000-10-26 00:55:27
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 3413 Bug
    Version: 8.2
    SubmitDate: '1999-11-05'
    LastModified: '2000-02-05'
    Severity: CRIT
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    OS: HP-UX
    OSVersion: 10.2
    FixedDate: '2000-10-25'
    ClosedDate: '2000-02-05'
    
    
    Name:
    Tara Sayyah
    
    ReproducibleScript:
    I shall say that I am not sure if this is bug or I have mishandled
    something; 
    Any hints/comments would be welcomed.
        
    I have been porting a rather complex tcl/tk utility; disregarding that;
    this utility when loading a C routine gets a coredump; I believe that I
    have reduced the code to the minimum relevent lines of just loading C
    routine and I still get a core dump!:
        
        C routine:
        --------------------------------------------------------------------
        #include <tcl.h>
        int Mysite_Init(Tcl_Interp *interp)
        {  
            Tcl_SetResult(interp, "Boo", TCL_STATIC);
            return TCL_OK;
        }
        ----------------------------------------------------------------------
        MakeFile:
        ----------------------------------------------------------------------
        CC=/opt/ansic/bin/cc
        LD=ld
        INCLUDE=        -I/home/taras/tcl8.2.0/include   
        CCFLAGS= +z -O -Aa -g  
        LDFLAGS=-b
        MYSITE_OBJS=mysite.o
        
        all:mysite.sl
        
        mysite.sl:$(MYSITE_OBJS) Makefile
        $(LD) $(LDFLAGS) $(INCLUDE) -o $@ $(MYSITE_OBJS)
        
        clean:
        rm -f *.o
        
        .c.o:
        $(CC) -c -o $@  $(INCLUDE) $(CCFLAGS) $*.c
        -------------------------------------------------------------------
        caller tcl:
        -------------------------------------------------------------------
        #!/home/taras/tcl8.2.0/bin/tclsh 
        puts "starts"
        load mysite.sl    
        puts "ends"
        --------------------------------------------------------------------
        output:
        --------------------------------------------------------------------
        taras@ces702> tclsh tara.tcl
        starts
        ends
        Memory fault(coredump)
        --------------------------------------------------------------------
        I am using an HP machine using HP-UX 10.2 operating system
        --------------------------------------------------------------------
        I have complied the tclsh from sources provided at scriptics site
        --------------------------------------------------------------------
    
    ObservedBehavior:
    ran gdb on core 
        ----------------------------------------------------------------
        taras@ces702>  /tmp_mnt/net/cre702/export/opt/gdb/bin/gdb tclsh core
        GNU gdb 4.18
        Copyright 1998 Free Software Foundation, Inc.
        GDB is free software, covered by the GNU General Public License, and you
        are
        welcome to change it and/or distribute copies of it under certain
        conditions.
        Type "show copying" to see the conditions.
        There is absolutely no warranty for GDB.  Type "show warranty" for
        details.
        This GDB was configured as "hppa2.0-hp-hpux10.20"...
        (no debugging symbols found)...
        Core was generated by `tclsh'.
        Program terminated with signal 11, Segmentation fault.
        
        warning: The shared libraries were not privately mapped; setting a
        breakpoint in a shared library will not work until you rerun the
        program.
        
        warning: Can't find file tclsh referenced in dld_list.
        Reading symbols from /home/taras/tcl8.2.0/lib/libtcl8.2.sl...done.
        Reading symbols from /usr/lib/libc.1...done.
        Reading symbols from /usr/lib/libdld.1...done.
        #0  0xc0055298 in  () from /usr/lib/libc.1
        (gdb
    
    DesiredBehavior:
    no core dumps
    
    
    I don't have the compiler that you are using, so I am unable to reproduce this problem.  I did try compiling with gcc, and had no problems on our HP system:
    
    hippo(1)$ uname -a
    HP-UX hippo B.10.20 A 9000/778 2000743181 two-user license
    hippo(2)$ ./out/bin/tclsh8.3 
    % load mysite.sl
    Boo
    % exit
    hippo(3)$
    
    If you have access to gcc, can you try compiling with that instead and tell me if you still see the problem?
    
    - eric
    
    -- 02/01/2000 ericm
    
    
    
  4. foundin changed to: "obsolete: 8.2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "when loading C lib; i get core dump"
  11. type changed to: "Bug"