Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

12
  • 1
    FWIW I unpacked bash_5.2.32-1+b1_amd64.deb locally on an Ubuntu 24.04 box, and printf '%f\n' 1 mostly gives me nan (occasionally -nan). OTOH the same bash version built from source on the same system seems to behave as expected. Commented Sep 17, 2024 at 20:14
  • 1
    @ChrisDavies no it does not seem so. My Bash package only depends on base-files and debianutils, and predepends on libc6 and libtinfo6, for which I have a compatible version. Commented Sep 18, 2024 at 7:36
  • 1
    @StéphaneChazelas Seems like this bug has been reported: bugs.debian.org/cgi-bin/bugreport.cgi?bug=1078556 Not sure why, but I compiled previous versions of Bash (down to 5.2-rc4) and they also have the bug (does it come from a library then?). Failed to compile Bash 4.4 though. Commented Sep 18, 2024 at 9:03
  • 1
    Weird behaviour. I can't reproduce under gdb, I can under ltrace or ltrace -e '*@*' the latter showing __printf_chk behaving erratically, so could be a libc bug. I can't reproduce with any other shell or printf implementation or gawk's printf. Commented Sep 18, 2024 at 9:15
  • 1
    It is a bash bug. Looks like it was fixed upstreams but only on devel branch, no 5.2 patch yet AFAICT. See also lists.gnu.org/archive/html/bug-bash/2024-08/msg00111.html Commented Sep 18, 2024 at 9:21