Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 04d0a1fc764cc60804b1ac2bdb024b2bd810cb18
Ticket: 960414ffffffffffffffffffffffffffffffffff
exit causes segmentation violation with Oratcl extension
User & Date: tmh on 2004-05-25 21:13:47
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Something has changed in the exit handling of Tcl since
    the 8.4.6 release.  This change causes a segmentation
    violation when using
    the Oratcl extension.
    
    This is similar to a previous Bug ID # 2560.  At issue
    is that the Oracle library (that cannot be changed)
    that is linked dynamically at runtime with Oratcl, has
    atexit() calls embedded in the library.  These calls
    fire when tcl finally calls exit().  If the Oratcl
    extension library is unloaded before the exit()
    happens, then the atexit() can no longer reference the
    symbols in the Oratcl library that called the oracle
    library.
    
    I am listing this as a Tcl Bug because, Oratcl has not
    been changed.
    This works just fine in Tcl 8.4.6.
    
    jumpgate: [75] > gdb /opt/tcl8.5a2d/bin/tclsh8.5 
    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 "sparc-sun-solaris2.7"...
    (gdb) run
    Starting program: /opt/tcl8.5a2d/bin/tclsh8.5 
    % package require Oratcl
    4.2
    % set lda [oralogon t/b@c]
    oralogon: invalid username/password; logon denied
    % exit
    
    Program received signal SIGSEGV, Segmentation fault.
    Cannot access memory at address 0xfe842e54.
    
    Maybe there is a way to preserve the library so that it
    is not unloaded, but I cannot tell from the
    documentation how to do that.
    
    Also,  Oratcl does use an exit handler.  If I add an
    exit(0) to my exit handler, the core dump goes away,
    but none of the other things in Tcl_Finalize occur.
    
    
    
  4. foundin changed to: "obsolete: 8.5a2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "tmh"
  9. subsystem changed to: "16. Commands A-H"
  10. title changed to:
    exit causes segmentation violation with Oratcl extension
    
  11. type changed to: "Bug"