From: Alexander Bluhm Subject: Re: smokeping build fails with new perl (perl segfault, locale-related?) To: tech Cc: Andrew Fresh Date: Fri, 17 May 2024 18:00:32 +0200 On Fri, May 17, 2024 at 04:47:23PM +0200, Alexander Bluhm wrote: > Seems to be a general problem with new Perl, no smokeping involved. > > $ perl -MPOSIX -e 'setlocale(LC_NUMERIC,"")' > Unknown locale category 4 at -e line 1. > Segmentation fault (core dumped) This fixes the segfault. The warning stays. ok? bluhm Index: gnu/usr.bin/perl/locale.c =================================================================== RCS file: /mount/openbsd/cvs/src/gnu/usr.bin/perl/locale.c,v diff -u -p -r1.10 locale.c --- gnu/usr.bin/perl/locale.c 14 May 2024 19:38:54 -0000 1.10 +++ gnu/usr.bin/perl/locale.c 17 May 2024 15:56:27 -0000 @@ -2858,7 +2858,7 @@ Perl_setlocale(const int category, const /* If the new locale is the same as the current one, nothing is actually * being changed, so do nothing. */ - if ( strEQ(retval, locale) + if ( retval != NULL && strEQ(retval, locale) && ( ! affects_LC_NUMERIC(category) # ifdef USE_LOCALE_NUMERIC