Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Apr 2014 11:28:39 +0900
From:      Tomohisa Tanaka <tomohisa.tanaka@gmail.com>
To:        David Chisnall <theraven@freebsd.org>
Cc:        freebsd-standards@freebsd.org
Subject:   Re: standards/188036: mblen(3) in EUC locales causes crash and segmentation fault.
Message-ID:  <CAP0ThOBjCZ1T=8X%2BjzTy_kbr8Px-8KGd=q%2BDfHC7Qk_sOj%2BwPA@mail.gmail.com>
In-Reply-To: <205C5DD1-C26B-4F6A-B640-C78E22D0567B@FreeBSD.org>
References:  <201403311610.s2VGA3E1055670@freefall.freebsd.org> <205C5DD1-C26B-4F6A-B640-C78E22D0567B@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I tried r264038 and it works for me.

Thank you very much for your quick response.

Tomohisa


2014-04-02 20:11 GMT+09:00 David Chisnall <theraven@freebsd.org>:

> I think this is an issue when uselocale() is called with -1 as the
> argument.  setlocale() for an EUC locale works correctly, as does
> newlocale()/uselocale().  However, in your test program, you go from an
> explicit per-thread locale to a generic one and uselocale is not correctly
> clearing the per-thread cache.
>
> This should be fixed in r264038, thank you for such a detailed report!
>  The test case was very helpful in diagnosing and fixing the problem.
>
> David
>
> On 31 Mar 2014, at 17:10, Tomohisa Tanaka <tomohisa.tanaka@gmail.com>
> wrote:
>
> > The following reply was made to PR standards/188036; it has been noted
> by GNATS.
> >
> > From: Tomohisa Tanaka <tomohisa.tanaka@gmail.com>
> > To: David Chisnall <theraven@freebsd.org>
> > Cc: freebsd-gnats-submit@freebsd.org
> > Subject: Re: standards/188036: mblen(3) in EUC locales causes crash and
> > segmentation fault.
> > Date: Tue, 1 Apr 2014 01:01:46 +0900
> >
> > --20cf303f672e1e5ef404f5e92be2
> > Content-Type: multipart/alternative;
> boundary=20cf303f672e1e5ef004f5e92be0
> >
> > --20cf303f672e1e5ef004f5e92be0
> > Content-Type: text/plain; charset=ISO-8859-1
> >
> > Thank you for your quick reply.
> >
> > Please can you test this and let me know if it fixes it for you?
> >
> >
> > Yes, but it does not work for me as follows:
> >
> > % gcc -g3 main.c ~/work/freebsd-usr-src/lib/libc/libc.a
> > % gdb ./a.out
> > GNU gdb 6.1.1 [FreeBSD]
> > Copyright 2004 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and you
> are
> > welcome to change it and/or distribute copies of it under certain
> conditions.
> > Type "show copying" to see the conditions.
> > There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> > This GDB was configured as "amd64-marcel-freebsd"...
> > (gdb) run
> > Starting program: /usr/home/syl/work/mblen/a.out
> > setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x000000000041823b in _EUC_mbrtowc (pwc=0x0, s=0x4321b2 "a", n=1,
> ps=0x63f318)
> >     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/euc.c:182
> > 182                     want = CEI->count[set = _euc_set(*s)];
> > (gdb) bt
> > #0  0x000000000041823b in _EUC_mbrtowc (pwc=0x0, s=0x4321b2 "a", n=1,
> >     ps=0x63f318)
> >     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/euc.c:182
> > #1  0x0000000000406def in mblen_l (s=0x4321b2 "a", n=1, locale=0x63f260)
> >     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/mblen.c:51
> > #2  0x0000000000406e95 in mblen (s=0x4321b2 "a", n=1)
> >     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/mblen.c:60
> > #3  0x0000000000406bb6 in main () at main.c:16
> > (gdb)
> >
> >
> > 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.
> >
> >
> > (Your fix causes the same thing for me, so you're right.)
> > The libc that I used for How-To-Repeat is not built by me (installed by
> > installer).
> >
> > % setenv LC_MESSAGES C
> > % env LANG=ja_JP.eucJP ./a.out
> > setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C
> > Segmentation fault (core dumped)
> > % ldd ./a.out
> > ./a.out:
> >         libc.so.7 => /lib/libc.so.7 (0x80081a000)
> > % env LANG=C ls -l /lib/libc.so.7
> > -r--r--r--  1 root  wheel  1406888 Sep 27  2013 /lib/libc.so.7
> > % md5 /lib/libc.so.7
> > MD5 (/lib/libc.so.7) = d997dd201ec08270e17383223fd2c40a
> >
> > (I verified /lib/libc.so.7 is not changed from
> > http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.2-RELEASE/base.txz)
> > I'm sorry, I had not understood this issue enough to make a patch.I
> > show another sample as follows:
> >
> > % cat main1.c
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <locale.h>
> > #include <xlocale.h>
> > #include <runetype.h>
> >
> > static void
> > showVariables(void)
> > {
> >   printf("_ThreadRuneLocale: %p\n", _ThreadRuneLocale);
> >   if (_ThreadRuneLocale != NULL) {
> >     printf("_ThreadRuneLocale->__variable: %p\n",
> >            _ThreadRuneLocale->__variable);
> >   }
> >   printf("__getCurrentRuneLocale(): %p\n", __getCurrentRuneLocale());
> >   if (__getCurrentRuneLocale() != NULL) {
> >     printf("__getCurrentRuneLocale()->__variable: %p\n",
> >            __getCurrentRuneLocale()->__variable);
> >   }
> >   printf("&_DefaultRuneLocale: %p\n", &_DefaultRuneLocale);
> >   printf("&_DefaultRuneLocale->__variable: %p\n",
> >          (&_DefaultRuneLocale)->__variable);
> > }
> >
> > int
> > main(void)
> > {
> >   printf("setlocale: %s\n", setlocale(LC_ALL, ""));
> >
> >   printf("[0]\n");
> >   showVariables();
> >
> >   locale_t newLocale = newlocale(LC_ALL_MASK, "C", NULL);
> >   locale_t oldLocale = uselocale(newLocale);
> >   /* ... */
> >
> >   printf("[1]\n");
> >   showVariables();
> >
> >   uselocale(oldLocale);
> >
> >   printf("[2]\n");
> >   showVariables();
> >
> >   printf("%d\n", mblen("a", 1));
> >   return 0;
> > }
> > % gcc -g3 main1.c
> > % gdb ./a.out
> > GNU gdb 6.1.1 [FreeBSD]
> > Copyright 2004 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and you
> are
> > welcome to change it and/or distribute copies of it under certain
> conditions.
> > Type "show copying" to see the conditions.
> > There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> > This GDB was configured as "amd64-marcel-freebsd"...
> > (gdb) run
> > Starting program: /usr/home/syl/work/mblen/a.out
> > setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C
> > [0]
> > _ThreadRuneLocale: 0x0
> > __getCurrentRuneLocale(): 0x800d0c000
> > __getCurrentRuneLocale()->__variable: 0x800c07040
> > &_DefaultRuneLocale: 0x600ee0
> > &_DefaultRuneLocale->__variable: 0x0
> > [1]
> > _ThreadRuneLocale: 0x600ee0
> > _ThreadRuneLocale->__variable: 0x0
> > __getCurrentRuneLocale(): 0x600ee0
> > __getCurrentRuneLocale()->__variable: 0x0
> > &_DefaultRuneLocale: 0x600ee0
> > &_DefaultRuneLocale->__variable: 0x0
> > [2]
> > _ThreadRuneLocale: 0x600ee0
> > _ThreadRuneLocale->__variable: 0x0
> > __getCurrentRuneLocale(): 0x600ee0
> > __getCurrentRuneLocale()->__variable: 0x0
> > &_DefaultRuneLocale: 0x600ee0
> > &_DefaultRuneLocale->__variable: 0x0
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x0000000800908880 in mbsnrtowcs () from /lib/libc.so.7
> > (gdb)
> >
> > After calling 'uselocale(oldLocale)' [2], _ThreadRuneLocale should not
> > be 0x600ee0.It is strange that the states [1] and [2] are the same. (I
> > hope this helps.)
> >
> > If I can help you in any other way, please let me know.
> >
> >
> >
> > 2014-03-31 18:57 GMT+09:00 David Chisnall <theraven@freebsd.org>:
> >
> >> On 31 Mar 2014, at 10:03, David Chisnall <theraven@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 == NULL || ((const _EucState *)ps)->want == 0);
> >>> }
> >>>
> >>> -#define      CEI     ((_EucInfo *)(_CurrentRuneLocale->__variable))
> >>> +#define      CEI     ((_EucInfo
> >> *)(__getCurrentRuneLocale()->__variable))
> >>>
> >>> #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.
> >>
> >> David
> >>
> >>
> >
> >
> > --
> > Tomohisa Tanaka
> > Tomohisa.Tanaka@gmail.com
> >
> > --20cf303f672e1e5ef004f5e92be0
> > Content-Type: text/html; charset=ISO-8859-1
> > Content-Transfer-Encoding: quoted-printable
> >
> > <div dir=3D"ltr">Thank you for your quick reply.<br><br><blockquote
> class=
> > =3D"gmail_quote" style=3D"margin:0px 0px 0px
> 0.8ex;border-left-width:1px;bo=
> >
> rder-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">=
> > Please can you test this and let me know if it fixes it for
> you?</blockquot=
> > e>
> > <br>Yes, but it does not work for me as follows:<br><pre
> style=3D"color:rgb=
> > (0,0,0);word-wrap:break-word;white-space:pre-wrap">% gcc -g3 main.c
> ~/work/=
> > freebsd-usr-src/lib/libc/libc.a=20
> > % gdb ./a.out=20
> > GNU gdb 6.1.1 [FreeBSD]
> > Copyright 2004 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and you
> ar=
> > e
> > welcome to change it and/or distribute copies of it under certain
> condition=
> > s.
> > Type &quot;show copying&quot; to see the conditions.
> > There is absolutely no warranty for GDB.  Type &quot;show warranty&quot;
> fo=
> > r details.
> > This GDB was configured as &quot;amd64-marcel-freebsd&quot;...
> > (gdb) run
> > Starting program: /usr/home/syl/work/mblen/a.out=20
> > setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x000000000041823b in _EUC_mbrtowc (pwc=3D0x0, s=3D0x4321b2
> &quot;a&quot;, =
> > n=3D1, ps=3D0x63f318)
> >     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/euc.c:182
> > 182                     want =3D CEI-&gt;count[set =3D _euc_set(*s)];
> > (gdb) bt
> > #0  0x000000000041823b in _EUC_mbrtowc (pwc=3D0x0, s=3D0x4321b2
> &quot;a&quo=
> > t;, n=3D1,=20
> >     ps=3D0x63f318)
> >     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/euc.c:182
> > #1  0x0000000000406def in mblen_l (s=3D0x4321b2 &quot;a&quot;, n=3D1,
> local=
> > e=3D0x63f260)
> >     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/mblen.c:51
> > #2  0x0000000000406e95 in mblen (s=3D0x4321b2 &quot;a&quot;, n=3D1)
> >     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/mblen.c:60
> > #3  0x0000000000406bb6 in main () at main.c:16
> > (gdb) </pre><br><blockquote class=3D"gmail_quote" style=3D"margin:0px
> 0px 0=
> > px
> 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-le=
> > ft-style:solid;padding-left:1ex">Actually, I&#39;m not sure how this bug
> ca=
> > n manifest, unless you&#39;ve somehow built libc with the wrong headers.
> =
> > =A0In runtype.h (which is included in euc.c), we have this:<br>
> > #define _CurrentRuneLocale (__getCurrentRuneLocale())<br>So these two
> versi=
> > ons should expand to the same
> thing.</blockquote><div><br></div><div>(Your =
> > fix causes the same thing for me, so you&#39;re right.)</div><div>The
> libc =
> > that I used for How-To-Repeat is not built by me (installed by
> installer).<=
> > /div>
> > <pre
> style=3D"color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">%=
> >  setenv LC_MESSAGES C
> > % env LANG=3Dja_JP.eucJP ./a.out
> > setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C
> > Segmentation fault (core dumped)
> > % ldd ./a.out
> > ./a.out:
> >         libc.so.7 =3D&gt; /lib/libc.so.7 (0x80081a000)
> > % env LANG=3DC ls -l /lib/libc.so.7=20
> > -r--r--r--  1 root  wheel  1406888 Sep 27  2013 /lib/libc.so.7
> > % md5 /lib/libc.so.7
> > MD5 (/lib/libc.so.7) =3D d997dd201ec08270e17383223fd2c40a</pre><pre
> style=
> > =3D"word-wrap:break-word"><font face=3D"arial"><span
> style=3D"white-space:n=
> > ormal">(I verified /lib/libc.so.7 is not changed
> from<br></span></font><spa=
> > n style=3D"color:rgb(0,0,0);font-family:arial;white-space:pre-wrap"><a
> href=
> > =3D"
> http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.2-RELEASE/base.txz"=
> >> http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.2-RELEASE/base.txz
> </a>=
> > )
> > </span><span
> style=3D"color:rgb(0,0,0);font-family:arial;white-space:pre-wr=
> > ap">
> > I&#39;m sorry, I had not understood this issue enough to make a patch.
> > </span><span
> style=3D"color:rgb(0,0,0);font-family:arial;white-space:pre-wr=
> > ap">I show another sample as follows:</span></pre><pre
> style=3D"word-wrap:b=
> > reak-word"><pre
> style=3D"color:rgb(0,0,0);word-wrap:break-word;white-space:=
> > pre-wrap">
> > % cat main1.c
> > #include &lt;stdio.h&gt;
> > #include &lt;stdlib.h&gt;
> > #include &lt;locale.h&gt;
> > #include &lt;xlocale.h&gt;
> > #include &lt;runetype.h&gt;
> >
> > static void
> > showVariables(void)
> > {
> >   printf(&quot;_ThreadRuneLocale: %p\n&quot;, _ThreadRuneLocale);
> >   if (_ThreadRuneLocale !=3D NULL) {
> >     printf(&quot;_ThreadRuneLocale-&gt;__variable: %p\n&quot;,
> >            _ThreadRuneLocale-&gt;__variable);
> >   }
> >   printf(&quot;__getCurrentRuneLocale(): %p\n&quot;,
> __getCurrentRuneLocale=
> > ());
> >   if (__getCurrentRuneLocale() !=3D NULL) {
> >     printf(&quot;__getCurrentRuneLocale()-&gt;__variable: %p\n&quot;,
> >            __getCurrentRuneLocale()-&gt;__variable);
> >   }
> >   printf(&quot;&amp;_DefaultRuneLocale: %p\n&quot;,
> &amp;_DefaultRuneLocale=
> > );
> >   printf(&quot;&amp;_DefaultRuneLocale-&gt;__variable: %p\n&quot;,
> >          (&amp;_DefaultRuneLocale)-&gt;__variable);
> > }
> >
> > int
> > main(void)
> > {
> >   printf(&quot;setlocale: %s\n&quot;, setlocale(LC_ALL, &quot;&quot;));
> >
> >   printf(&quot;[0]\n&quot;);
> >   showVariables();
> >
> >   locale_t newLocale =3D newlocale(LC_ALL_MASK, &quot;C&quot;, NULL);
> >   locale_t oldLocale =3D uselocale(newLocale);
> >   /* ... */
> >
> >   printf(&quot;[1]\n&quot;);
> >   showVariables();
> >
> >   uselocale(oldLocale);
> >
> >   printf(&quot;[2]\n&quot;);
> >   showVariables();
> >
> >   printf(&quot;%d\n&quot;, mblen(&quot;a&quot;, 1));
> >   return 0;
> > }
> > % gcc -g3 main1.c
> > % gdb ./a.out
> > GNU gdb 6.1.1 [FreeBSD]
> > Copyright 2004 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and you
> ar=
> > e
> > welcome to change it and/or distribute copies of it under certain
> condition=
> > s.
> > Type &quot;show copying&quot; to see the conditions.
> > There is absolutely no warranty for GDB.  Type &quot;show warranty&quot;
> fo=
> > r details.
> > This GDB was configured as &quot;amd64-marcel-freebsd&quot;...
> > (gdb) run
> > Starting program: /usr/home/syl/work/mblen/a.out=20
> > setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C
> > [0]
> > _ThreadRuneLocale: 0x0
> > __getCurrentRuneLocale(): 0x800d0c000
> > __getCurrentRuneLocale()-&gt;__variable: 0x800c07040
> > &amp;_DefaultRuneLocale: 0x600ee0
> > &amp;_DefaultRuneLocale-&gt;__variable: 0x0
> > [1]
> > _ThreadRuneLocale: 0x600ee0
> > _ThreadRuneLocale-&gt;__variable: 0x0
> > __getCurrentRuneLocale(): 0x600ee0
> > __getCurrentRuneLocale()-&gt;__variable: 0x0
> > &amp;_DefaultRuneLocale: 0x600ee0
> > &amp;_DefaultRuneLocale-&gt;__variable: 0x0
> > [2]
> > _ThreadRuneLocale: 0x600ee0
> > _ThreadRuneLocale-&gt;__variable: 0x0
> > __getCurrentRuneLocale(): 0x600ee0
> > __getCurrentRuneLocale()-&gt;__variable: 0x0
> > &amp;_DefaultRuneLocale: 0x600ee0
> > &amp;_DefaultRuneLocale-&gt;__variable: 0x0
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x0000000800908880 in mbsnrtowcs () from /lib/libc.so.7
> > (gdb) <span style=3D"font-family:arial"> </span></pre><pre
> style=3D"word-wr=
> > ap:break-word"><pre style=3D"word-wrap:break-word"><span
> style=3D"white-spa=
> > ce:pre-wrap;color:rgb(0,0,0);font-family:arial">After calling
> &#39;uselocal=
> > e(oldLocale)&#39; [2], _ThreadRuneLocale </span><span
> style=3D"white-space:=
> > pre-wrap;color:rgb(0,0,0);font-family:arial">should not be 0x600ee0.
> > </span><span style=3D"color:rgb(0,0,0)"><font face=3D"arial"><span
> style=3D=
> > "white-space:pre-wrap">It is strange that the states [1] and [2] are the
> sa=
> > me. (I hope this helps.)</span></font></span></pre><pre
> style=3D"word-wrap:=
> > break-word">
> > <span style=3D"color:rgb(0,0,0);font-family:Arial,&#39;Arial
> New&#39;,&#39;=
> > \00ff2d\00ff33 \00ff30
> \0030b4\0030b7\0030c3\0030af&#39;,sans-serif;font-si=
> > ze:13px;white-space:normal">If I can help you in any other way, please
> let =
> > me know.</span></pre>
> > <pre
> style=3D"color:rgb(34,34,34);white-space:pre-wrap;word-wrap:break-word=
> > "></pre></pre></pre></div><div class=3D"gmail_extra"><br><br><div
> class=3D"=
> > gmail_quote">2014-03-31 18:57 GMT+09:00 David Chisnall <span
> dir=3D"ltr">&l=
> > t;<a href=3D"mailto:theraven@freebsd.org"
> target=3D"_blank">theraven@freebs=
> > d.org</a>&gt;</span>:<br>
> > <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0
> .8ex;border-left:1p=
> > x #ccc solid;padding-left:1ex"><div class=3D"">On 31 Mar 2014, at 10:03,
> Da=
> > vid Chisnall &lt;theraven@FreeBSD.org&gt; wrote:<br>
> > <br>
> > &gt; I think the fix should actually be:<br>
> > &gt;<br>
> > &gt; Index: locale/euc.c<br>
> > &gt;
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> >
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
> > &gt; --- locale/euc.c =A0 =A0 =A0(revision 263226)<br>
> > &gt; +++ locale/euc.c =A0 =A0 =A0(working copy)<br>
> > &gt; @@ -134,7 +134,7 @@<br>
> > &gt; =A0 =A0 =A0 return (ps =3D=3D NULL || ((const _EucState
> *)ps)-&gt;want=
> >  =3D=3D 0);<br>
> > &gt; }<br>
> > &gt;<br>
> > &gt; -#define =A0 =A0 =A0CEI =A0 =A0 ((_EucInfo
> *)(_CurrentRuneLocale-&gt;_=
> > _variable))<br>
> > &gt; +#define =A0 =A0 =A0CEI =A0 =A0 ((_EucInfo
> *)(__getCurrentRuneLocale()=
> > -&gt;__variable))<br>
> > &gt;<br>
> > &gt; #define =A0 =A0 =A0 _SS2 =A0 =A00x008e<br>
> > &gt; #define =A0 =A0 =A0 _SS3 =A0 =A00x008f<br>
> > &gt;<br>
> > &gt;<br>
> > &gt;<br>
> > &gt; Please can you test this and let me know if it fixes it for you?<br>
> > <br>
> > </div>Actually, I&#39;m not sure how this bug can manifest, unless
> you&#39;=
> > ve somehow built libc with the wrong headers. =A0In runtype.h (which is
> inc=
> > luded in euc.c), we have this:<br>
> > <br>
> > #define _CurrentRuneLocale (__getCurrentRuneLocale())<br>
> > <br>
> > So these two versions should expand to the same thing.<br>
> > <span class=3D"HOEnZb"><font color=3D"#888888"><br>
> > David<br>
> > <br>
> > </font></span></blockquote></div><br><br clear=3D"all"><div><br></div>--
> <b=
> > r>Tomohisa Tanaka<br><a href=3D"mailto:Tomohisa.Tanaka@gmail.com
> ">Tomohisa.=
> > Tanaka@gmail.com</a>
> > </div>
> >
> > --20cf303f672e1e5ef004f5e92be0--
> > --20cf303f672e1e5ef404f5e92be2
> > Content-Type: text/plain; charset=US-ASCII; name="report1.txt"
> > Content-Disposition: attachment; filename="report1.txt"
> > Content-Transfer-Encoding: base64
> > X-Attachment-Id: f_htfxye6m0
> >
> >
> JSBnY2MgLWczIG1haW4uYyB+L3dvcmsvZnJlZWJzZC11c3Itc3JjL2xpYi9saWJjL2xpYmMuYQol
> >
> IGdkYiAuL2Eub3V0CkdOVSBnZGIgNi4xLjEgW0ZyZWVCU0RdCkNvcHlyaWdodCAyMDA0IEZyZWUg
> >
> U29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLgpHREIgaXMgZnJlZSBzb2Z0d2FyZSwgY292ZXJlZCBi
> >
> eSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UsIGFuZCB5b3UgYXJlCndlbGNvbWUgdG8g
> >
> Y2hhbmdlIGl0IGFuZC9vciBkaXN0cmlidXRlIGNvcGllcyBvZiBpdCB1bmRlciBjZXJ0YWluIGNv
> >
> bmRpdGlvbnMuClR5cGUgInNob3cgY29weWluZyIgdG8gc2VlIHRoZSBjb25kaXRpb25zLgpUaGVy
> >
> ZSBpcyBhYnNvbHV0ZWx5IG5vIHdhcnJhbnR5IGZvciBHREIuICBUeXBlICJzaG93IHdhcnJhbnR5
> >
> IiBmb3IgZGV0YWlscy4KVGhpcyBHREIgd2FzIGNvbmZpZ3VyZWQgYXMgImFtZDY0LW1hcmNlbC1m
> >
> cmVlYnNkIi4uLgooZ2RiKSBydW4KU3RhcnRpbmcgcHJvZ3JhbTogL3Vzci9ob21lL3N5bC93b3Jr
> >
> L21ibGVuL2Eub3V0IApzZXRsb2NhbGU6IGphX0pQLmV1Y0pQL2phX0pQLmV1Y0pQL2phX0pQLmV1
> >
> Y0pQL2phX0pQLmV1Y0pQL2phX0pQLmV1Y0pQL0MKClByb2dyYW0gcmVjZWl2ZWQgc2lnbmFsIFNJ
> >
> R1NFR1YsIFNlZ21lbnRhdGlvbiBmYXVsdC4KMHgwMDAwMDAwMDAwNDE4MjNiIGluIF9FVUNfbWJy
> >
> dG93YyAocHdjPTB4MCwgcz0weDQzMjFiMiAiYSIsIG49MSwgcHM9MHg2M2YzMTgpCiAgICBhdCAv
> >
> dXNyL2hvbWUvc3lsL3dvcmsvZnJlZWJzZC11c3Itc3JjL2xpYi9saWJjL2xvY2FsZS9ldWMuYzox
> >
> ODIKMTgyICAgICAgICAgICAgICAgICAgICAgd2FudCA9IENFSS0+Y291bnRbc2V0ID0gX2V1Y19z
> > ZXQoKnMpXTsKKGdkYikgCg==
> > --20cf303f672e1e5ef404f5e92be2
> > Content-Type: text/plain; charset=US-ASCII; name="report2.txt"
> > Content-Disposition: attachment; filename="report2.txt"
> > Content-Transfer-Encoding: base64
> > X-Attachment-Id: f_htfxyj7g1
> >
> >
> JSBjYXQgbWFpbjEuYwojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5j
> >
> bHVkZSA8bG9jYWxlLmg+CiNpbmNsdWRlIDx4bG9jYWxlLmg+CiNpbmNsdW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gaW4g
> > bWJzbnJ0b3djcyAoKSBmcm9tIC9saWIvbGliYy5zby43CihnZGIpIAo=
> > --20cf303f672e1e5ef404f5e92be2--
> > _______________________________________________
> > freebsd-standards@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-standards
> > To unsubscribe, send any mail to "
> freebsd-standards-unsubscribe@freebsd.org"
>
>


-- 
Tomohisa Tanaka
Tomohisa.Tanaka@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAP0ThOBjCZ1T=8X%2BjzTy_kbr8Px-8KGd=q%2BDfHC7Qk_sOj%2BwPA>