Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 May 2019 21:17:59 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 237699] Hex printing with subr_prf cuts off zero-padded MSB
Message-ID:  <bug-237699-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237699

            Bug ID: 237699
           Summary: Hex printing with subr_prf cuts off zero-padded MSB
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: contact@knnspeed.com

Hi,

Using a a print function that uses subr_prf.c with an argument of %#016qx h=
as
the first two padding 0s cut off. This only impacts zeros added by padding,=
 as
data does not get cut. It appears to be an issue in kvprintf in the section
with the "number:" label. I'm trying to print an AVX register, using
%#016qx%qx%qx%qx, but I think this would show up on any architecture on... a
very large number of BSD versions?

I believe it has something to do with this part of the kvprintf "number:"
section--I think 2 characters are being erroneously subtracted, but I haven=
't
had an opportunity to really read through kvprintf and figure out how to fix
this without accidentally harming anything else:

                        if (!ladjust && padc =3D=3D '0')
                                dwidth =3D width - tmp;

I also noticed that FreeBSD uses subr_prf.c V8.3, though I know I've seen a
V8.4 floating around...

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-237699-227>