0

I implement an application which used shared library with pthreads.

App <- lib1.so <- re2.so. Only re2.so uses pthreads. lib1.so depend from lib2.so, App depend from lib1.so. re2.so - regular expression library.

After execution the main function I get a segmentation fault.

Output from gdb contains only one line:

#0  0x0804af34 in main ()
31  }

I try to use app <- re2.so, it's work correctly.

I read that a possible cause of the error in the wrong pthreads library initialization when application independent on pthreads. But how it can be fixed?

serkos
  • 306
  • 1
  • 4
  • 2
    Have you considered the possibility that the crash is due to a bug in your code? Do you link with pthread in both `lib1` and `App`? – UmNyobe Aug 04 '14 at 08:45
  • I check with simple case - only FilteredRE2 + several regular expression. It still fails. Now only re2.so linked with pthreads, but I try all combinations (lib1 + pthread, app + pthread, all + pthread) – serkos Aug 04 '14 at 09:55

0 Answers0