From: Randy MacLeod <randy.macleod@windriver.com>
To: Hemanth.KumarMD@windriver.com, openembedded-core@lists.openembedded.org
Cc: Sundeep.Kokkonda@windriver.com
Subject: Re: [OE-core] [PATCH v4 8/8] busybox: fix printf ptest failure with glibc 2.43
Date: Thu, 12 Mar 2026 14:52:39 -0400 [thread overview]
Message-ID: <026e2eed-609c-4689-b593-a33333957bdc@windriver.com> (raw)
In-Reply-To: <20260312161038.2578649-8-Hemanth.KumarMD@windriver.com>
[-- Attachment #1: Type: text/plain, Size: 7045 bytes --]
Hi Hemanth,
On 2026-03-12 12:10 p.m., Hemanth Kumar M D via lists.openembedded.org
wrote:
> From: Hemanth Kumar M D<Hemanth.KumarMD@windriver.com>
>
> Following ptests were failing on aarch64 after glibc 2.43 upgrade:
> - printf_understands_%s_'"x'_"'y"_"'zTAIL"
> - printf_handles_positive_numbers_for_%f
>
> Backport fix from Debian bug #1128825.
>
> References:https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1128825
>
> Signed-off-by: Hemanth Kumar M D<Hemanth.KumarMD@windriver.com>
> ---
> ...printf-ptest-failure-with-glibc-2.43.patch | 114 ++++++++++++++++++
> meta/recipes-core/busybox/busybox_1.37.0.bb | 1 +
> 2 files changed, 115 insertions(+)
> create mode 100644 meta/recipes-core/busybox/busybox/0001-busybox-fix-printf-ptest-failure-with-glibc-2.43.patch
>
> diff --git a/meta/recipes-core/busybox/busybox/0001-busybox-fix-printf-ptest-failure-with-glibc-2.43.patch b/meta/recipes-core/busybox/busybox/0001-busybox-fix-printf-ptest-failure-with-glibc-2.43.patch
> new file mode 100644
> index 0000000000..951812532b
> --- /dev/null
> +++ b/meta/recipes-core/busybox/busybox/0001-busybox-fix-printf-ptest-failure-with-glibc-2.43.patch
> @@ -0,0 +1,114 @@
> +busybox: fix printf ptest failure with glibc 2.43
> +
> +Following ptests were failing on aarch64 after glibc 2.43 upgrade:
> + - printf_understands_%s_'"x'_"'y"_"'zTAIL"
> + - printf_handles_positive_numbers_for_%f
> +
> +Backport fix from Debian bug #1128825.
> +
> +Upstream-Status: Submitted [https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=1128825;filename=busybox_glibc-2.43_thp.patch;msg=10]
This status is fine for now but please submit a follow-up commit to
change the Upstream-Status
once you have done the work below.
This URL isn't what we usually mean by "upstream" since it's Debian not
the busybox folks.
Also there's no evidence that that patch was submitted to the busybox
devs so the "Submitted"
status may also be incorrect.
It's good to cite your sources but please review:
https://lists.busybox.net/pipermail/busybox/
and git upstream busybox git repo:
git://busybox.net/busybox.git
to see if the "true" upstream has a submitted or merged fix.
If not, please send them the Debian fix and CC the developer
ensuring that you don't change the folks from:
https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=1128825
Thanks,
../Randy
> +
> +Signed-off-by: Hemanth Kumar M D<Hemanth.KumarMD@windriver.com>
> +
> +diff --git a/coreutils/printf.c b/coreutils/printf.c
> +index 3cd48cfcc..a5d995ab5 100644
> +--- a/coreutils/printf.c
> ++++ b/coreutils/printf.c
> +@@ -191,6 +191,7 @@ static void print_direc(char *format, unsigned fmt_length,
> + double dv;
> + char saved;
> + char *have_prec, *have_width;
> ++ int saved_errno, ret;
> +
> + saved = format[fmt_length];
> + format[fmt_length] = '\0';
> +@@ -205,22 +206,32 @@ static void print_direc(char *format, unsigned fmt_length,
> +
> + switch (format[fmt_length - 1]) {
> + case 'c':
> +- printf(format, *argument);
> ++ saved_errno = errno;
> ++ ret = printf(format, *argument);
> ++ /* Restore errno if there was no error */
> ++ if (ret >= 0) {
> ++ errno = saved_errno;
> ++ }
> + break;
> + case 'd':
> + case 'i':
> + llv = my_xstrtoll(skip_whitespace(argument));
> + print_long:
> ++ saved_errno = errno;
> + if (!have_width) {
> + if (!have_prec)
> +- printf(format, llv);
> ++ ret = printf(format, llv);
> + else
> +- printf(format, precision, llv);
> ++ ret = printf(format, precision, llv);
> + } else {
> + if (!have_prec)
> +- printf(format, field_width, llv);
> ++ ret = printf(format, field_width, llv);
> + else
> +- printf(format, field_width, precision, llv);
> ++ ret = printf(format, field_width, precision, llv);
> ++ }
> ++ /* Restore errno if there was no error */
> ++ if (ret >= 0) {
> ++ errno = saved_errno;
> + }
> + break;
> + case 'o':
> +@@ -238,16 +249,21 @@ static void print_direc(char *format, unsigned fmt_length,
> + } else {
> + /* Hope compiler will optimize it out by moving call
> + * instruction after the ifs... */
> ++ saved_errno = errno;
> + if (!have_width) {
> + if (!have_prec)
> +- printf(format, argument, /*unused:*/ argument, argument);
> ++ ret = printf(format, argument, /*unused:*/ argument, argument);
> + else
> +- printf(format, precision, argument, /*unused:*/ argument);
> ++ ret = printf(format, precision, argument, /*unused:*/ argument);
> + } else {
> + if (!have_prec)
> +- printf(format, field_width, argument, /*unused:*/ argument);
> ++ ret = printf(format, field_width, argument, /*unused:*/ argument);
> + else
> +- printf(format, field_width, precision, argument);
> ++ ret = printf(format, field_width, precision, argument);
> ++ }
> ++ /* Restore errno if there was no error */
> ++ if (ret >= 0) {
> ++ errno = saved_errno;
> + }
> + break;
> + }
> +@@ -257,16 +273,21 @@ static void print_direc(char *format, unsigned fmt_length,
> + case 'g':
> + case 'G':
> + dv = my_xstrtod(argument);
> ++ saved_errno = errno;
> + if (!have_width) {
> + if (!have_prec)
> +- printf(format, dv);
> ++ ret = printf(format, dv);
> + else
> +- printf(format, precision, dv);
> ++ ret = printf(format, precision, dv);
> + } else {
> + if (!have_prec)
> +- printf(format, field_width, dv);
> ++ ret = printf(format, field_width, dv);
> + else
> +- printf(format, field_width, precision, dv);
> ++ ret = printf(format, field_width, precision, dv);
> ++ }
> ++ /* Restore errno if there was no error */
> ++ if (ret >= 0) {
> ++ errno = saved_errno;
> + }
> + break;
> + } /* switch */
> diff --git a/meta/recipes-core/busybox/busybox_1.37.0.bb b/meta/recipes-core/busybox/busybox_1.37.0.bb
> index d3851a27b9..2a38372339 100644
> --- a/meta/recipes-core/busybox/busybox_1.37.0.bb
> +++ b/meta/recipes-core/busybox/busybox_1.37.0.bb
> @@ -59,6 +59,7 @@ SRC_URI ="https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
> file://CVE-2025-46394-01.patch \ file://CVE-2025-46394-02.patch \
> file://CVE-2025-60876.patch \ +
> file://0001-busybox-fix-printf-ptest-failure-with-glibc-2.43.patch \ "
> SRC_URI:append:libc-musl =" file://musl.cfg"
> SRC_URI:append:x86-64 =" file://sha_accel.cfg"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#232994):https://lists.openembedded.org/g/openembedded-core/message/232994
> Mute This Topic:https://lists.openembedded.org/mt/118281850/3616765
> Group Owner:openembedded-core+owner@lists.openembedded.org
> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [randy.macleod@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
--
# Randy MacLeod
# Wind River Linux
[-- Attachment #2: Type: text/html, Size: 9384 bytes --]
prev parent reply other threads:[~2026-03-12 18:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 16:10 [PATCH v4 1/8] glibc: Upgrade to 2.43 release Hemanth.KumarMD
2026-03-12 16:10 ` [PATCH v4 2/8] gettext: upgrade 0.26 -> 1.0 Hemanth.KumarMD
2026-03-12 16:10 ` [PATCH v4 3/8] gcc-runtime: avoid discarded-qualifiers build failure with glibc 2.43 Hemanth.KumarMD
2026-03-12 16:10 ` [PATCH v4 4/8] libxcrypt: " Hemanth.KumarMD
2026-03-12 16:10 ` [PATCH v4 5/8] barebox-tools: fix " Hemanth.KumarMD
2026-03-12 16:10 ` [PATCH v4 6/8] ltp: workaround openat2 " Hemanth.KumarMD
2026-03-12 16:10 ` [PATCH v4 7/8] glib-2.0: fix gdatetime ptest " Hemanth.KumarMD
2026-03-12 16:10 ` [PATCH v4 8/8] busybox: fix printf " Hemanth.KumarMD
2026-03-12 18:52 ` Randy MacLeod [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=026e2eed-609c-4689-b593-a33333957bdc@windriver.com \
--to=randy.macleod@windriver.com \
--cc=Hemanth.KumarMD@windriver.com \
--cc=Sundeep.Kokkonda@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox