[Bug 2085548] Comment bridged from LTC Bugzilla
bugproxy
2085548 at bugs.launchpad.net
Mon Dec 9 09:19:27 UTC 2024
*** This bug is a duplicate of bug 2083131 ***
https://bugs.launchpad.net/bugs/2083131
------- Comment From JREMUS at de.ibm.com 2024-12-09 04:18 EDT-------
I have successfully verified that printf of floats now works fine on s390x with the fixed bash package from oracular-proposed:
Verification that it fails on vanilla Ubuntu 24.10:
$ docker run -it --rm public.ecr.aws/docker/library/ubuntu:24.10
...
# bash -c "printf '%f\n' 1.1"
Segmentation fault (core dumped)
Verification that is is fixed with bash/oracular-proposed:
# sed -i -s "s/^Suites: oracular .*/& oracular-proposed/" /etc/apt/sources.list.d/ubuntu.sources
# cat <<EOF >/etc/apt/preferences.d/proposed-updates
# Configure apt to allow selective installs of packages from proposed
Package: *
Pin: release a=oracular-proposed
Pin-Priority: 400
EOF
# apt-get install bash/oracular-proposed
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Selected version '5.2.32-1ubuntu1.1' (Ubuntu:24.10/oracular-proposed [s390x]) for 'bash'
The following packages will be upgraded:
bash
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 845 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports oracular-proposed/main s390x bash s390x 5.2.32-1ubuntu1.1 [845 kB]
Fetched 845 kB in 0s (2766 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 6423 files and directories currently installed.)
Preparing to unpack .../bash_5.2.32-1ubuntu1.1_s390x.deb ...
Unpacking bash (5.2.32-1ubuntu1.1) over (5.2.32-1ubuntu1) ...
Setting up bash (5.2.32-1ubuntu1.1) ...
update-alternatives: error: alternative path /usr/share/man/man7/bash-builtins.7.gz doesn't exist
Processing triggers for debianutils (5.20) ...
# bash -c "printf '%f\n' 1.1"
1.100000
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/2085548
Title:
[UBUNTU 24.10] bash printf of floating point value fails on Ubuntu
24.10
Status in Ubuntu on IBM z Systems:
Fix Committed
Status in bash package in Ubuntu:
Fix Released
Status in bash source package in Oracular:
In Progress
Status in bash source package in Plucky:
Fix Released
Bug description:
== Comment: #1 - Boris Barth <Boris.mail at de.ibm.com> - 2024-10-24 09:55:01 ==
---Problem Description---
bash printf of floating point value fails on Ubuntu 24.10
---uname output---
Linux tuxmaker 6.11.0-8-generic #8-Ubuntu SMP Mon Sep 16 12:49:35 UTC 2024 s390x s390x s390x GNU/Linux
Machine Type = IBM z16 Model A01
---Steps to Reproduce---
Ubuntu 24.10 on s390x:
$ bash -c "printf '%f\n' 1.1"
[1] 3372599 segmentation fault bash -c "printf '%f\n' 1.1"
Ubuntu 24.10 on x86-64:
$ docker run -it --rm public.ecr.aws/docker/library/ubuntu:24.10
root at 99a22af7f0f4:/# bash -c "printf '%f\n' 1.1"
nan
It used to work on Ubuntu 24.04 on x86-64 (and s390x):
$ docker run -it --rm public.ecr.aws/docker/library/ubuntu:24.04
root at 61fbb357246c:/# bash -c "printf '%f\n' 1.1"
1.100000
In GDB on Ubuntu 24.10 on s390x:
...
Program received signal SIGSEGV, Segmentation fault.
Download failed: Invalid argument. Continuing without source file ./stdio-common/vfprintf-internal.c.
0x000003fff7d716fc in __printf_buffer (buf=buf at entry=0x3ffffff9240, format=format at entry=0x2aa001ad000 "%.3Lf", ap=ap at entry=0x3ffffff9398, mode_flags=mode_flags at entry=2) at
vfprintf-internal.c:996
warning: 996 vfprintf-internal.c: No such file or directory
(gdb) x/i $pc
=> 0x3fff7d716fc <__printf_buffer+1308>: ld %f1,0(%r7)
(gdb) p/x $r7
$1 = 0x2
(gdb) disassm __printf_buffer
...
0x000003fff7d716f6 <+1302>: lg %r7,0(%r1)
=> 0x000003fff7d716fc <+1308>: ld %f1,0(%r7)
...
(gdb) p/x $r1
$2 = 0x3ffffff93e0
(gdb) p/x *(uint64_t *)$r1
$3 = 0x2
Userspace tool obtained from project website: na
Userspace tool common name: bash
Userspace package version: 5.2.32-1ubuntu1
The userspace tool has the following bit modes: 64-bit
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/2085548/+subscriptions
More information about the foundations-bugs
mailing list