Index | Thread | Search

From:
Andrew Hewus Fresh <andrew@afresh1.com>
Subject:
Re: smokeping build fails with new perl (perl segfault, locale-related?)
To:
Alexander Bluhm <bluhm@openbsd.org>
Cc:
tech <tech@openbsd.org>
Date:
Fri, 17 May 2024 09:33:57 -0700

Download raw body.

Thread
On Fri, May 17, 2024 at 06:00:32PM +0200, Alexander Bluhm wrote:
> 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?

Seems OK afresh1@, I'll get a PR together for upstream.



> 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
>