Jason Pyeron writes: > While working an updated build of pdfgrep, I ran in to a crash when > the environment local was something other than LC_ALL=C. > > Looking at http://www.cplusplus.com/reference/locale/locale/locale/ > the empty string passed to the constructor should use the > environment's default locale and if the “argument” does not represent > a valid C-locale in the implementation, runtime_error is thrown.
It looks like the C++ standard library goes through all the right motions, but then fails to construct an actual locale object as it's supposed to do and thus errors out. Cygwin is not glibc based, so this seems to be essentially the same bug as described here: https://stackoverflow.com/questions/58245286/why-does-stdlocale-name-give-different-results-on-clang-and-gcc and elsewhere. This bug is at least 17 years old by now, so if anybody comes up with a patch that would be helpful. It's entirely possible that the configury failed to detect (if it even tried) that Cygwin has (or should have) thread-safe locale API by now, but it might have a different API than glibc. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Terratec KOMPLEXER: http://Synth.Stromeko.net/Downloads.html#KomplexerWaves -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple