This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: A difficult question about locale_mutex uninitialized
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: "FCG WANG Baohua" <Baohua dot WANG at alcatel-sbell dot com dot cn>
- Cc: <gcc-help at gcc dot gnu dot org>, <libstdc++ at gcc dot gnu dot org>, <gcc at gcc dot gnu dot org>, "FCG Ke Yu" <Yu dot Ke at alcatel-sbell dot com dot cn>
- Date: Thu, 7 Sep 2006 11:36:20 +0200
- Subject: Re: A difficult question about locale_mutex uninitialized
- References: <A9DE2BAF233E444FA9C5E77A5825A01E8650F6@ydmail.sbell.com.cn>
> SEH: System call: ose_mutex_lock
> SEH: Error: A pointer to an uninitialized mutex (at 0x00b27988) was presented to
> the kernSEH: Information about current process "core_supervisor"
> SEH: Pid 0x0001000b bid 0x00010008 progpid 0x00000000
> SEH: Callstack backtrace:
> SEH: FrameAddress ReturnAddress FrameSize
> SEH: 0x0aa54390 - -
> SEH: Analyzing pool of faulty process
>
> After looked up our system.map file, we found that it always refer the following pointer:
>
> .bss 0x00b27988 0x20 /vobs/rtosdev/OSE/gcc_solaris2_powerpc_3.4.2/powerpc-eabi/lib/nof/libstdc++.a(locale_init.o)
> 0x00b27988 __gnu_internal::locale_mutex
Are you compiling with threads enabled? On many platforms, a special
flag (-pthread) is required to use threads.
> I want to know how to find the bug?
> It is the problem of the libstdc++ or our application ?
> How to rightly initialize the locale_mutex ?
> Why it isn't initialized in libstdc++.a under OSE ?
If you pre-process the libstdc++ file locale_init.cc, you should see
what is going on. At least, this will tell you what libstdc++ thinks it
should use for locks.
best,
benjamin