Date: Sat, 13 Jul 2024 08:57:20 -0600 From: Warner Losh <imp@bsdimp.com> To: Konstantin Belousov <kostikbel@gmail.com> Cc: Warner Losh <imp@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: fc3e5334ab89 - main - Fix "%hhi" conversion for kvprintf() Message-ID: <CANCZdfqdVLH7Xy0C7D3hSCjo%2Bem_WbU5vwb=BK9_SeB9wKtg_g@mail.gmail.com> In-Reply-To: <Zn7S_J-H4Lg1GZcA@kib.kiev.ua> References: <202406281500.45SF0sOZ057462@gitrepo.freebsd.org> <Zn7S_J-H4Lg1GZcA@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000006f7e83061d223750 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jun 28, 2024 at 9:13=E2=80=AFAM Konstantin Belousov <kostikbel@gmai= l.com> wrote: > On Fri, Jun 28, 2024 at 03:00:54PM +0000, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3Dfc3e5334ab891eab22a4278384be6f9= b74d6d91a > > > > commit fc3e5334ab891eab22a4278384be6f9b74d6d91a > > Author: Sebastian Huber <sebastian.huber@embedded-brains.de> > > AuthorDate: 2024-06-13 11:01:31 +0000 > > Commit: Warner Losh <imp@FreeBSD.org> > > CommitDate: 2024-06-28 14:57:39 +0000 > > > > Fix "%hhi" conversion for kvprintf() > > > > The signedness of "char" is implementation-dependent. > > > > Reviewed by: imp,zlei,nightquick@proton.me > > Pull Request: https://github.com/freebsd/freebsd-src/pull/1290 > > --- > > sys/kern/subr_prf.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c > > index e291a1fa00a6..4dc989e2d1f1 100644 > > --- a/sys/kern/subr_prf.c > > +++ b/sys/kern/subr_prf.c > > @@ -904,7 +904,7 @@ handle_sign: > > else if (hflag) > > num =3D (short)va_arg(ap, int); > > else if (cflag) > > - num =3D (char)va_arg(ap, int); > > + num =3D (signed char)va_arg(ap, int); > > else > > num =3D va_arg(ap, int); > > number: > Isn't the same fix needed for libexec/rtld-elf/rtld_printf.c ? > Oh I believe that it is. The code is different in appearance, but it's clear that this is needed there too... I'm a little behind on things, but I hadn't forgotten. Warner --0000000000006f7e83061d223750 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Fri, Jun 28, 2024 at 9:13=E2=80=AF= AM Konstantin Belousov <<a href=3D"mailto:kostikbel@gmail.com">kostikbel= @gmail.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style= =3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding= -left:1ex">On Fri, Jun 28, 2024 at 03:00:54PM +0000, Warner Losh wrote:<br> > The branch main has been updated by imp:<br> > <br> > URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3Dfc3e5334ab89= 1eab22a4278384be6f9b74d6d91a" rel=3D"noreferrer" target=3D"_blank">https://= cgit.FreeBSD.org/src/commit/?id=3Dfc3e5334ab891eab22a4278384be6f9b74d6d91a<= /a><br> > <br> > commit fc3e5334ab891eab22a4278384be6f9b74d6d91a<br> > Author:=C2=A0 =C2=A0 =C2=A0Sebastian Huber <<a href=3D"mailto:sebas= tian.huber@embedded-brains.de" target=3D"_blank">sebastian.huber@embedded-b= rains.de</a>><br> > AuthorDate: 2024-06-13 11:01:31 +0000<br> > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> > CommitDate: 2024-06-28 14:57:39 +0000<br> > <br> >=C2=A0 =C2=A0 =C2=A0Fix "%hhi" conversion for kvprintf()<br> >=C2=A0 =C2=A0 =C2=A0<br> >=C2=A0 =C2=A0 =C2=A0The signedness of "char" is implementatio= n-dependent.<br> >=C2=A0 =C2=A0 =C2=A0<br> >=C2=A0 =C2=A0 =C2=A0Reviewed by: imp,zlei,<a href=3D"mailto:nightquick@= proton.me" target=3D"_blank">nightquick@proton.me</a><br> >=C2=A0 =C2=A0 =C2=A0Pull Request: <a href=3D"https://github.com/freebsd= /freebsd-src/pull/1290" rel=3D"noreferrer" target=3D"_blank">https://github= .com/freebsd/freebsd-src/pull/1290</a><br> > ---<br> >=C2=A0 sys/kern/subr_prf.c | 2 +-<br> >=C2=A0 1 file changed, 1 insertion(+), 1 deletion(-)<br> > <br> > diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c<br> > index e291a1fa00a6..4dc989e2d1f1 100644<br> > --- a/sys/kern/subr_prf.c<br> > +++ b/sys/kern/subr_prf.c<br> > @@ -904,7 +904,7 @@ handle_sign:<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0else if (hflag)<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0num =3D (short)va_arg(ap, int);<br= > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0else if (cflag)<br> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0num =3D (char)va_arg(ap, int);<br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0num =3D (signed char)va_arg(ap, int);<br= > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0else<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0num =3D va_arg(ap, int);<br> >=C2=A0 number:<br> Isn't the same fix needed for libexec/rtld-elf/rtld_printf.c ?<br></blo= ckquote><div><br></div><div>Oh I believe that it is. The code is different = in appearance, but it's clear that this is needed there too... I'm = a little behind on things, but I hadn't forgotten.<br></div><div><br></= div><div>Warner<br></div></div></div> --0000000000006f7e83061d223750--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqdVLH7Xy0C7D3hSCjo%2Bem_WbU5vwb=BK9_SeB9wKtg_g>