Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Seg Fault on program exit with OCI in shared library with dlopen() on Linux

Seg Fault on program exit with OCI in shared library with dlopen() on Linux

From: Mike R. Prevost <mprevost_at_gradkell.com>
Date: Tue, 1 May 2001 09:19:22 -0500
Message-ID: <XyzH6.2526$c4.339688@e420r-chi1.usenetserver.com>

I'm having a frustrating problem. I am writing a shared library that contains all my database logic. This library is dynamically loaded at runtime via the dlopen()/dlsym() interface. I'm porting from a Win32 DLL to Linux and then to HP-UX.

Everything works great with the shared library. I can link it in with a driver program at link time and all is well. However, when I dynamically load it, the program seg faults when exiting. gdb tells me:

Program received signal SIGSEGV, Segmentation fault. 0x4036df9c in epc_exit_handler ()

At first glance, this appears like some sort of stack corruption. It might be, but I don't think it is a result of my code because it only happens when the OCI shared library is dynamically loaded. ALSO, I am able to dynamically load other shared libraries without this problem.

I'm made sure that the top level "driver" program is linked with libpthread. This evidently is a requirement when using OCI via shared libraries. I've also tried linking the shared library against both libclntst8.a as well as libclntsh.so. Same story in both cases.

Has anyone run across this before?!?!

Thanks.

Received on Tue May 01 2001 - 09:19:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US