bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mingw investigation - help needed


From: Bruno Haible
Subject: mingw investigation - help needed
Date: Wed, 17 Jul 2024 12:39:35 +0200

Hi,

About a week ago, one of the CI runs on GitHub reported this unit test
failure on 64-bit mingw:

===================== test-c-strtof-mt.sh.log =====================
thread2 disturbed by thread1!
../../gltests/test-c-strtof-mt.sh: line 24:  3498 Segmentation fault      
LC_ALL=$LOCALE_FR ${CHECKER} ./test-c-strtof-mt${EXEEXT}
FAIL test-c-strtof-mt.sh (exit status: 1)
===================================================================

This indicates there is a MT-safety bug in mingw's strtof() function.

However:

  * I can't reproduce it. I ran
      $ LC_ALL=French_France.1252 ./test-c-strtof-mt 25200
    for 7 hours (instead of just 1 second) in a VM of mine — no crash.

  * I also don't see an MT-safety bug in the mingw-w64 code.
    strtof, defined in stdio/strtof.c, merely invokes strtod.
    strtod, defined in gdtoa/strtodnrp.c, merely invokes __strtodg.
    __strtodg, defined in gdtoa/strtodg.c, compiled with USE_LOCALE=1 and
    NO_LOCALE_CACHE=1, makes use of localeconv() which uses a static buffer
    — but this should not be a problem since the current locale is the same
    in all threads (setlocale() is not used by the test program while the
    threads are running, and there is no uselocale() on mingw).

Any ideas?

Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]