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?