This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc 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]

[Bug libc/322] Calling dcgettext(3) simultaneously sometimes causes segmentation fault.


------- Additional Comments From maeda dot naoaki at jp dot fujitsu dot com  2004-09-08 12:08 -------
(In reply to comment #0)

Sorry, I forgot to initialize a recursive lock in patch3. 
In following part of the patch3, '__libc_lock_define_recursive'
must be '__libc_lock_define_initialized_recursive'.


> diff -Naur glibc-2.3.3/intl/loadmsgcat.c glibc-2.3.3-
> gettext_fix/intl/loadmsgcat.c
> --- glibc-2.3.3/intl/loadmsgcat.c	2003-09-04 02:44:46.000000000 +0900
> +++ glibc-2.3.3-gettext_fix/intl/loadmsgcat.c	2004-08-12 
14:24:41.000000000 
> +0900
> @@ -471,6 +471,16 @@
>  # define freea(p) free (p)
>  #endif
>  
> +/* Thread safetyness.  */
> +#ifdef _LIBC
> +# include <bits/libc-lock.h>
> +#else
> +/* Provide dummy implementation if this is outside glibc.  */
> +# define __libc_lock_define_recursive(CLASS, NAME)
> +# define __libc_lock_lock_recursive(NAME)
> +# define __libc_lock_unlock_recursive(NAME)
> +#endif
> +
>  
>  /* Prototypes for local functions.  Needed to ensure compiler checking of
>     function argument counts despite of K&R C function definition syntax.  */
> @@ -899,6 +909,16 @@
>    struct loaded_domain *domain;
>    int revision;
>    const char *nullentry;
> +  __libc_lock_define_recursive (static, lock);
> +


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=322

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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