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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Fri, Jun 28, 2024 at 9:13 AM Konstantin Belousov <kostikbel@gmail.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=fc3e5334ab891eab22a4278384be6f9b74d6d91a > > > > 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 = (short)va_arg(ap, int); > > else if (cflag) > > - num = (char)va_arg(ap, int); > > + num = (signed char)va_arg(ap, int); > > else > > num = 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 [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 28, 2024 at 9:13 AM Konstantin Belousov <<a href="mailto:kostikbel@gmail.com">kostikbel@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="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="https://cgit.FreeBSD.org/src/commit/?id=fc3e5334ab891eab22a4278384be6f9b74d6d91a" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=fc3e5334ab891eab22a4278384be6f9b74d6d91a</a><br> > <br> > commit fc3e5334ab891eab22a4278384be6f9b74d6d91a<br> > Author: Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>><br> > AuthorDate: 2024-06-13 11:01:31 +0000<br> > Commit: Warner Losh <imp@FreeBSD.org><br> > CommitDate: 2024-06-28 14:57:39 +0000<br> > <br> > Fix "%hhi" conversion for kvprintf()<br> > <br> > The signedness of "char" is implementation-dependent.<br> > <br> > Reviewed by: imp,zlei,<a href="mailto:nightquick@proton.me" target="_blank">nightquick@proton.me</a><br> > Pull Request: <a href="https://github.com/freebsd/freebsd-src/pull/1290" rel="noreferrer" target="_blank">https://github.com/freebsd/freebsd-src/pull/1290</a><br> > ---<br> > sys/kern/subr_prf.c | 2 +-<br> > 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> > else if (hflag)<br> > num = (short)va_arg(ap, int);<br> > else if (cflag)<br> > - num = (char)va_arg(ap, int);<br> > + num = (signed char)va_arg(ap, int);<br> > else<br> > num = va_arg(ap, int);<br> > number:<br> Isn't the same fix needed for libexec/rtld-elf/rtld_printf.c ?<br></blockquote><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>help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqdVLH7Xy0C7D3hSCjo%2Bem_WbU5vwb=BK9_SeB9wKtg_g>
