standards/188036: mblen(3) in EUC locales causes crash and segmentation fault.
theraven at FreeBSD.org
Mon Mar 31 10:00:01 UTC 2014
The following reply was made to PR standards/188036; it has been noted by GNATS.
From: David Chisnall <theraven at FreeBSD.org>
To: Tomohisa Tanaka <tomohisa.tanaka at gmail.com>
Cc: freebsd-gnats-submit at FreeBSD.org
Subject: Re: standards/188036: mblen(3) in EUC locales causes crash and segmentation fault.
Date: Mon, 31 Mar 2014 10:57:01 +0100
On 31 Mar 2014, at 10:03, David Chisnall <theraven at FreeBSD.org> wrote:
> I think the fix should actually be:
> Index: locale/euc.c
> --- locale/euc.c (revision 263226)
> +++ locale/euc.c (working copy)
> @@ -134,7 +134,7 @@
> return (ps =3D=3D NULL || ((const _EucState *)ps)->want =3D=3D =
> -#define CEI ((_EucInfo *)(_CurrentRuneLocale->__variable))
> +#define CEI ((_EucInfo =
> #define _SS2 0x008e
> #define _SS3 0x008f
> Please can you test this and let me know if it fixes it for you?
Actually, I'm not sure how this bug can manifest, unless you've somehow =
built libc with the wrong headers. In runtype.h (which is included in =
euc.c), we have this:
#define _CurrentRuneLocale (__getCurrentRuneLocale())
So these two versions should expand to the same thing. =20
More information about the freebsd-standards