Public bug reported:

== Comment: #1 - Boris Barth <[email protected]> - 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@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@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@entry=0x3ffffff9240, 
format=format@entry=0x2aa001ad000 "%.3Lf", ap=ap@entry=0x3ffffff9398, 
mode_flags=mode_flags@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

** Affects: linux (Ubuntu)
     Importance: Undecided
     Assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
         Status: New


** Tags: architecture-all bugnameltc-210353 severity-medium 
targetmilestone-inin---

** Tags added: architecture-all bugnameltc-210353 severity-medium
targetmilestone-inin---

** Changed in: ubuntu
     Assignee: (unassigned) => Ubuntu on IBM Power Systems Bug Triage 
(ubuntu-power-triage)

** Package changed: ubuntu => linux (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2085548

Title:
  [UBUNTU 24.10] bash printf of floating point value fails on Ubuntu
  24.10

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2085548/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to