From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27820 invoked by alias); 14 Jul 2005 12:48:52 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 27724 invoked by uid 48); 14 Jul 2005 12:48:45 -0000 Date: Thu, 14 Jul 2005 13:01:00 -0000 Message-ID: <20050714124845.27723.qmail@sourceware.org> From: "jakub at redhat dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050705135434.22309.jakub@redhat.com> References: <20050705135434.22309.jakub@redhat.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libstdc++/22309] mt allocator doesn't pthread_key_delete it's keys X-Bugzilla-Reason: CC X-SW-Source: 2005-07/txt/msg01715.txt.bz2 List-Id: ------- Additional Comments From jakub at redhat dot com 2005-07-14 12:48 ------- That patch fixes the original testcase, but unfortunately does not fix the following one. cat > P.c < #include void * tf (void *arg) { void *h = dlopen ("./libP.so", RTLD_LAZY); void (*fn) (void); if (!h) return 0; fn = dlsym (h, "foo"); fn (); void *h2 = dlopen ("libstdc++.so.6", RTLD_LAZY); if (!h2) return 0; dlclose (h); return 0; } int main (void) { pthread_t th; pthread_create (&th, NULL, tf, NULL); pthread_join (th, NULL); return 0; } EOF cat > libP.C < #include template class __gnu_cxx::__mt_alloc >; typedef std::char_traits my_traits_type; typedef __gnu_cxx::__mt_alloc > my_allocator_type; typedef std::basic_string my_string; extern "C" void foo (void) { my_string s; s += "hello"; } EOF g++ -g -O2 -shared -fpic -o libP.so libP.C gcc -g -O2 -o P P.c -ldl -lpthread -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22309