On Thu, Apr 24, 2025 at 12:45:24AM +0300, Radoslav Kolev wrote: > I have noticed an issue in hexdump on a big endian system (S390), > which is not considered safe for unaligned access by busybox and > memcpy is used as fallback instead of pointer casts (although s390 > seems to be, at least according to: > https://github.com/git/git/commit/ee7dc310af660f423732369e955651ef2f05011d) > > Also, a number of tests for od/hexdump didn't properly account for big endian > systems, so I've added variations for those tests, as well as test for the > issue I found (which was not covered by the current tests).
FYI, there has been a patch for fixing some of the endian issues[1]. It's hard for me to tell which is better :) [1]: https://lists.busybox.net/pipermail/busybox/2024-October/090951.html Thanks, Yao Zi > Radoslav Kolev (3): > hexdump: fix regression for uint16 on big endian systems > od: make -B test little endian only, add variant for big endian > hexdump: add tests for %x, handle little/big endian properly > > libbb/dump.c | 10 ++++- > testsuite/hexdump.tests | 91 +++++++++++++++++++++++++++++++---------- > testsuite/od.tests | 13 +++++- > 3 files changed, 89 insertions(+), 25 deletions(-) > > -- > 2.47.1 > > _______________________________________________ > busybox mailing list > [email protected] > https://lists.busybox.net/mailman/listinfo/busybox _______________________________________________ busybox mailing list [email protected] https://lists.busybox.net/mailman/listinfo/busybox
