[PATCH v6 04/11] stdio-common: Add __translated_number_width

Florian Weimer fweimer at redhat.com
Mon Jan 30 11:03:24 UTC 2023


* Dmitry V. Levin:

> On Mon, Jan 30, 2023 at 11:42:21AM +0100, Florian Weimer via Libc-alpha wrote:
>> * Dmitry V. Levin:
>> 
>> > Hi,
>> >
>> > On Fri, Dec 16, 2022 at 09:15:22PM +0100, Florian Weimer via Libc-alpha wrote:
>> >> This function will be used to compute the width of a number
>> >> after i18n digit translation.
>> >
>> > I haven't bisected, but I suppose it was this changeset that introduced
>> > a regression reported by the strace test suite.
>> >
>> > glibc-2.36$ cat <<'EOF' |gcc -xc - && ./a.out
>> > #include <stdio.h>
>> > int main() { printf("%03d\n", 1); return 0; }
>> > EOF
>> > 001
>> >
>> > The same test on master prints 0001 instead of 001.
>> 
>> Sorry, I can't reproduce it.  Did you build glibc yourself from upstream
>> sources, or did you get the build from somewhere else?
>
> This was initially reported by the strace test suite running on
> rawhide-test.fedorainfracloud.org, and I suppose the patch submitted
> by Andreas today fixes it.

Andreas' fix is for %#03o, though.  Perhaps the reduction above is
incorrect?

Thanks,
Florian



More information about the Strace-devel mailing list