From: Bastian Bittorf <bb@npl.de>
To: musl@lists.openwall.com
Cc: mailinglist <openwrt-devel@lists.openwrt.org>
Subject: [musl] busybox problem on powerpc PPC/32bit (hardware TP-Link-WDR-4900-v1)
Date: Sat, 11 Feb 2023 12:51:47 +0000 [thread overview]
Message-ID: <20230211125147.7ud3rx2ozflm7zsb@email> (raw)
With OpenWRT i recognized a strange behavior of ash-shell scripts.
It happens only on target PowerPC, e.g. m68k, arm, mips, x86 are
unaffected.
The visible strange behavior in 'ash' is:
$ test A -gt 5 && echo OK
ash: A: out of range
OK
Ofcourse this wrong returncode leads to all sorts of things...
I tested several busybox releases (1.33.2, 1.35.0, 1.36.0) and
crosscompiled with musl-git-b76f37f (from musl.cc) and
crosscompiled with glibc: powerpc-linux-gnu-gcc (Debian-12.2.0)
(it's the same for all versions)
The resulting linux + busybox images ready for QEMU are here:
http://intercity-vpn.de/mpc85xx/
If needed i can provide build instructions.
Maybe somebody with more powerpc assembly knowledge can help here.
The underlying code is here:
https://git.busybox.net/busybox/tree/coreutils/test.c#n488
But i can not spot the error:
static number_t getn(const char *s)
{
char *p;
errno = 0;
r = strtol(s, &p, 10);
if (errno != 0)
syntax(s, "out of range");
return r;
}
Best Greetings,
Bastian Bittorf
next reply other threads:[~2023-02-11 12:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-11 12:51 Bastian Bittorf [this message]
2023-02-11 14:01 ` Rich Felker
2023-02-11 19:27 ` Bastian Bittorf
2023-02-11 19:30 ` Rich Felker
2023-02-12 8:17 ` Bastian Bittorf
2023-02-12 22:34 ` Rich Felker
2023-02-11 14:47 ` Bastian Bittorf
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=20230211125147.7ud3rx2ozflm7zsb@email \
--to=bb@npl.de \
--cc=musl@lists.openwall.com \
--cc=openwrt-devel@lists.openwrt.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).