[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: setlocale with NULL locale (to read current locale) segfaults on MSY
From: |
Bruno Haible |
Subject: |
Re: setlocale with NULL locale (to read current locale) segfaults on MSYS |
Date: |
Sat, 30 Apr 2022 13:44:31 +0200 |
Reuben Thomas wrote:
> on MSYS it goes wrong
> ...
> setlocale_null_with_lock (category=category@entry=0, buf=buf@entry=0xffffbd80
> "", bufsize=bufsize@entry=3221) at setlocale_null.c:228
> 228 if (pthread_in_use())
> (gdb)
> 230 pthread_mutex_t *lock = gl_get_setlocale_null_lock ();
It looks like you are building the code meant for POSIX platforms on a
native Windows system, and that system's POSIX threads emulation is deficient.
Try configuring with --enable-threads=windows, as documented in
https://www.gnu.org/software/gnulib/manual/html_node/Gnulib-multithreading.html
If that works fine and you want to make it the default, add an invocation of
gl_AVOID_WINPTHREAD to your configure.ac file.
Bruno