Cannot dlclose() module when including exception_ptr.hpp in GCC 4.5
Hi I'm having and issue with boost and gcc 4.5, I'm posting here before posting in the gcc mailing list 'cause it only happends if using boost. Thre following problem was tested with boost 1.44 and boost 1.46 (single and multi threaded) Situation: - Environment with GCC 4.5.2 (kernel 2-6-36 and 4.6.37, glibc 2.11 and 2.12 - C application that loads/unloads dynamic modules using dlopen/dlclose - C++ dynamic module compiled/linked agans boost::thread, and including <boost/exception_ptr> Problem: - dlclose() always returns zero, so the module is never unloaded Including <boost/thread/thread.hpp> or any other boost header works fine This only happends with GCC 4.5, so it could be a problem related to gcc, but I dnot know it yet. I'm attanching 3 small test files, so you can check if this happens on your machine, just execute 'make run' After reading the test application you say 'remove the while loop!', but the right behavior is that the second call to dlclose() should fail with 'shared object ot open'. Thanks in advance -- Saludos! :wq PS: Escuse my poor english :P
On Mon, Mar 21, 2011 at 6:19 PM, ichramm <juanantonio.ram@gmail.com> wrote:
Hi
I'm having and issue with boost and gcc 4.5, I'm posting here before posting in the gcc mailing list 'cause it only happends if using boost.
Not just Boost. Take a look at this thread: http://www.cygwin.com/ml/libc-help/2010-11/msg00013.html It seems that it is some combination of statics, templates and shared objects. No idea if a fix is available, and it is not clear to me if the bug is because of the distro, the GCC version or what. Hope that helps.
participants (2)
-
ichramm
-
Ignacio Burgueño