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]

Re: Core dump when a shared object is throwing an exception


> A process is producing a segmentation fault (a SIGSEGV signal) when his 
> shared object is throwing an exception. This part of code is throbbed 
> gracefully when it was compiled and linked statically. Is someone knows the 
> possible causes of these faults from a shared object that are running well 
> as static objects ?

The list of possible causes is rather long:
- it could be that GCC does not support shared libraries on your system
- it could be that GCC does not support exceptions being thrown from shared
  libraries on your system
- it could be that not all files were compiled with exception handling
  (in particular, if you link C code)
- it could be a bug in the assembler or linker of your system
- it could be that you should have compiled the code with -fPIC and didn't,
  or that you forgot to pass some other important option
- it could be something else

That should cover all causes, in particular the last option :-)

Hope this helps,
Martin

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