This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dlopen() crash -gcc 3.4.6 20060404


Hi,

 On a quick look ---

> 
> My apologies if this message doesn?t seem appropriate on this list.

 gcc-help list is appropriate for such issues.

> _handle = dlopen( "./libchrcv.so", RTLD_NOW | RTLD_GLOBAL );

 Have you tried with any other library or only this ? I tried the entire 
program with a small testcase. It appears to be running *fine* which
says any deviation (like segmentation fault) should be because of 
libchrcv.so only.

 Ofcourse I am assuming you compiled and linked well taking -ldl into 
consideration and that you have defined LD_LIBRARY_PATH clearly without 
which your program will not run at all.

 Core dump file shows that libchrcv.so has relocation dependencies on 
other modules. You might want to concentrate on those issues and check 
your build options.

 Btwn, use plain text format. 

> ???????? if ( 0 == _handle )
> ???????? {
> ??????????? printf("ShareableContentHandler::Load() - dlopen failed
> '%s'.\n", dlerror() );
> ???????? }
> else
> ???????? {
> ??????????? printf("ShareableContentHandler::Load() - dlopen success
> '%s'.\n", dlerror() );
> ???????? }
> return 0;
> }
> 
> libchrcv.so is a shared library which in turn links against 2 libraries ?
> librcvagent.so and libcontrolagent.so. I verified that both these .so files
> are present in the path specified in LD_LIBRARY_PATH.
> 
> I compile this program using gcc test.c ?ldl & it compiles & links fine.
> However, when I execute it, I get a segmentation fault. The output is:-
> 
> Starting now !!!
> Segmentation fault
> 
> There is no core file generated. I capture the LD_DEBUG output & it is
> attached for reference.
> 
> I?ll be thankful if somebody can look at the attached file & guide me on
> what the problem is.
> 
> Thanks in advance.
> 
> Regards,
> Gaurav.
> 
> 
> 

-- 
Regards,
Anitha B
@S A N K H Y A


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]