This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix locking issue in newlocale


On Fri, Jul 16, 2004 at 02:16:39PM +0200, Jakub Jelinek wrote:
> 2004-07-16  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* locale/newlocale.c: Include bits/libc-lock.h.
> 	(__libc_setlocale_lock): Extern decl.
> 	(__newlocale): Use it.
> 	Reported by Ulrich Weigand <Ulrich.Weigand@de.ibm.com>.

FYI, this patch clearly doesn't fix all segfaults in 12658_thread-1, but
the crashes no longer appear in glibc locale related functions.
E.g. I get segfaults in
#0  0x0000002a957b3b40 in std::locale::name () from /usr/lib64/libstdc++.so.6
#1  0x0000002a957b5dd8 in std::locale::global () from /usr/lib64/libstdc++.so.6
#2  0x0000000000401cde in thread_main ()
#3  0x0000002a9565debc in start_thread () from /lib64/tls/libpthread.so.0
#4  0x0000002a95c30df3 in thread_start () from yy/libc.so.6
or
#0  0x0000002a95bd6c00 in strlen () from yy/libc.so.6
#1  0x0000002a957b3cc9 in std::locale::name () from /usr/lib64/libstdc++.so.6
#2  0x0000002a957b5dd8 in std::locale::global () from /usr/lib64/libstdc++.so.6
#3  0x0000000000401cde in thread_main ()
#4  0x0000002a9565debc in start_thread () from /lib64/tls/libpthread.so.0
#5  0x0000002a95c30df3 in thread_start () from yy/libc.so.6
, also malloc corruptions, etc.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]