I have application.so on Aix 5.3 and gcc 4.2.4. Application.so uses boost:asio. There is example.c which does dlopen and dlclose for application.so. However, when example.c exits - I get a core dump. Pl note that all operations are performed successfully.<br> <br>If I comment out boost related code in application.so and still link boost_system.so while building application.so, I still get core dump on exit of example.c . However, if I do not link boost_system.so while building application.so, I do not get any core dump on exit of example.c.<br> <br>This is what I use for building boost:-<br><br>./bjam --with-system --build-dir=/opt/boost_1_42_0/tmp link=shared runtime-link=shared address-model=32 stage<br><br>I can see following warnings while building application.so with boost_system.so:-<br> <br>ld: 0711-224 WARNING: Duplicate symbol: .non-virtual thunk to boost::exception_detail::error_info_injector<boost::system::system_error>::~error_info_injector<br><br>ld: 0711-224 WARNING: Duplicate symbol: .non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >::~clone_impl()<br> <br>ld: 0711-224 WARNING: Duplicate symbol: .non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >::~clone_impl()<br><br>ld: 0711-224 WARNING: Duplicate symbol: .non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >::clone() const<br> <br>ld: 0711-224 WARNING: Duplicate symbol: .non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >::rethrow() const<br><br>ld: 0711-224 WARNING: Duplicate symbol: .non-virtual thunk to boost::exception_detail::error_info_injector<boost::system::system_error>::~error_info_injector::system_error> >::~clone_impl()<br> <br>ld: 0711-224 WARNING: Duplicate symbol: .non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system:<br><br>ld: 0711-224 WARNING: Duplicate symbol: .non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >::~clone_impl()<br> <br>ld: 0711-224 WARNING: Duplicate symbol: .global destructors keyed to ras_arg_t<br><br>ld: 0711-224 WARNING: Duplicate symbol: .global constructors keyed to ras_arg_t<br><br>I am assuming that these duplicate destructors are not getting invoked during dlclose, but during exit - by which time library is unloaded.<br> <br>I have tried boost_1_40, boost_1_42 , boost_1_45 and gcc 4.2.0. Has anyone seen this issue before. If yes, any help would be very much appreciated.<br><br>example.c:-<br><br>{<br>hLib = dlopen(libPath, RTLD_LAZY | RTLD_GLOBAL);<br> <br>fprintf(stderr, "Before dlclose");<br><br>dlclose(hLib);<br>}<br><br>Above segment is where the problem occurs. As soon as, example.c exits, I get core dump.<br><br>Thanks & Regards,<br><br>jns.<br>