Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

printf %ld regression from 20200725a to 20200731 on 32-bit big-endian platforms #69

Closed
zv-io opened this issue May 17, 2023 · 3 comments

Comments

@zv-io
Copy link

zv-io commented May 17, 2023

On 32-bit big-endian platforms (such as ppc or sparc), there was a regression in the printf %ld format specifier. Minimal reproducer:

# 32-bit ppc and sparc
$ echo 1 | awk '{printf "%d\n%ld\n", $1,$1}'
1
0
# 32-bit x86, arm, etc.
$ echo 1 | awk '{printf "%d\n%ld\n", $1,$1}'
1
1

More information:

I can provide access to a 32-bit PowerPC or SPARC environment, though QEMU user may be sufficient for debugging/testing.

@ThomasDickey
Copy link
Owner

agreed - Zach van Rijn sent mail about this on April 19. I was able to reproduce the problem, and intend working on mawk once I'm done with fixes for byacc.

@ThomasDickey
Copy link
Owner

The relevant change-log item is indeed Debian #303825 though the relationship could use a couple of lines for clarity. I'll do that. At the moment, I'm studying a (simple) fix for this problem.

@ThomasDickey
Copy link
Owner

Released fix (20230525)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants