[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug 1883984] Re: QEMU S/390x sqxbr (128-bit IEEE 754 square root) crash

From: Launchpad Bug Tracker
Subject: [Bug 1883984] Re: QEMU S/390x sqxbr (128-bit IEEE 754 square root) crashes qemu-system-s390x
Date: Mon, 03 Aug 2020 06:45:58 -0000

** Merge proposal linked:

You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

  QEMU S/390x sqxbr (128-bit IEEE 754 square root) crashes qemu-system-

Status in QEMU:
  Fix Committed
Status in qemu package in Ubuntu:
  In Progress
Status in qemu source package in Focal:

Bug description:
  In porting software to guest Ubuntu 18.04 and 20.04 VMs for S/390x, I 
  that some of my own numerical programs, and also a GNU configure script for at
  least one package with CC=clang, would cause an instant crash of the VM, 
  also destroying recently opened files, and producing long strings of NUL 
  in /var/log/syslog in the S/390 guest O/S.

  Further detective work narrowed the cause of the crash down to a single IBM 
  instruction: sqxbr (128-bit IEEE 754 square root).  Here is a one-line program
  that when compiled and run on a VM hosted on QEMUcc emulator version 4.2.0 
  (Debian 1:4.2-3ubuntu6.1) [hosted on Ubuntu 20.04 on a Dell Precision 7920 
  workstation with an Intel Xeon Platinum 8253 CPU],  and also on QEMU emulator 
  version 5.0.0, reproducibly produces a VM crash under qemu-system-s390x.

  % cat bug-sqrtl-one-line.c
  int main(void) { volatile long double x, r; x = 4.0L; __asm__ 
__volatile__("sqxbr %0, %1" : "=f" (r) : "f" (x)); return (0);}

  % cc bug-sqrtl-one-line.c && ./a.out
  Segmentation fault (core dumped)

  The problem code may be the function float128_sqrt() defined in 
  starting at line 7619.  I have NOT attempted to run the qemu-system-s390x 
  under a debugger.  However, I observe that S/390 is the only CPU family that 
I know of,
  except possibly for a Fujitsu SPARC-64, that has a 128-bit square root in 
  Thus, this instruction bug may not have been seen before.

To manage notifications about this bug go to:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]