c++ - g++ static string member causes segmentation fault -


i own static library "my.a", static library pure c library. static library internally links c++ static library "yours.a" , whoever consumes library has link against libstdc++ since library has dependency on libstdc++.

there program "final_exec" linking dynamically against libstdc++, , linking statically library.

when launching executable, , while executable finished executing , calles exit, segmentation fault , following stack trace

*** glibc detected *** ./stage-o/bin/amd64/cats: double free or corruption        (!prev): 0x0000000016846b80 *** ======= backtrace: ========= /lib64/libc.so.6[0x2ac1f98e54af] /lib64/libc.so.6(cfree+0x4b)[0x2ac1f98e97ab] /slowfs/swe82/abhish_temp/clientstore/v35/stage-  o/lib/amd64/libstdc++.so.6(_znssd1ev+0x1f)[0x2ac1f91820af] /lib64/libc.so.6(exit+0xe5)[0x2ac1f98a7255]  ~basic_string destructor throwing exception while freeing global string. 

just troubleshoot if remove dependency on library "yours.a" library , link executable, don't segmentation fault.

this final_executable linking against other shared libraries boost, qt etc has dependency on libstdc++ , libstdc++ linked dynamically in these shared libs.

can provide reasonable conclusion problem?

sorry not providing code, don't own of code, own "my.a" library c library, think issue in mix c++ libraries somewhere.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -