https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66830
pleuba at swissonline dot ch changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pleuba at swissonline dot ch --- Comment #1 from pleuba at swissonline dot ch --- Created attachment 36022 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36022&action=edit Test program that reproduce the problem By executing the script test.sh, you can easily reproduce the problem. core dump shows that the second call to plugin2.so crashes. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f27fd946bc5 in Test::set (i=2) at lib.hpp:10 10 *test.pi = i; Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.149.el6.x86_64 libgcc-4.4.7-11.el6.x86_64 libstdc++-4.4.7-11.el6.x86_64 (gdb) bt #0 0x00007f27fd946bc5 in Test::set (i=2) at lib.hpp:10 #1 0x00007f27fd946b3e in plugin2_test () at plugin2.cpp:6 #2 0x000000000040063c in load_plugin2 () at test.cpp:8 #3 0x0000000000400676 in main (argc=1, argv=0x7fffa4ea2908) at test.cpp:17 (gdb)