qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [Bug 1841442] [NEW] floating point emulation can fail to se


From: Paul Clarke
Subject: [Qemu-devel] [Bug 1841442] [NEW] floating point emulation can fail to set FE_INEXACT
Date: Mon, 26 Aug 2019 15:00:00 -0000

Public bug reported:

Floating point emulation can fail to set FE_INEXACT in some
circumstances. This shows up quite often in glibc's "math" tests.  A
similar test is attached.

On ppc64le native:
--
$ gcc nextafter.c -o nextafter -lm
$ ./nextafter $(./nextafter)
0x0000000000000001 0.000000
0x0

0xa000000
FE_INEXACT FE_UNDERFLOW
0x0000000000000000 0.000000
--

On x86_64:
--
$ gcc nextafter.c -o nextafter -lm
$ ./nextafter $(./nextafter)
0x0000000000000001 0.000000
0x0

0x30
FE_INEXACT FE_UNDERFLOW 
0x0000000000000000 0.000000
--

Using qemu-system-ppc64
--
$ ./nextafter $(./nextafter)
0x0000000000000001 0.000000
0x0

0x8000000
FE_UNDERFLOW 
0x0000000000000000 0.000000
--

Using qemu-x86_64:
--
$ ./nextafter $(./nextafter)
0x0000000000000001 0.000000
0x0

0x0

0x0000000000000000 0.000000
--

QEMU versions vary, but not too much, and are pretty close to git HEAD:
- 586f3dced9 (HEAD -> master, origin/master, origin/HEAD) Merge remote-tracking 
branch 'remotes/cohuck/tags/s390x-20190822' into staging
- 864ab31 Update version for v4.1.0-rc4 release

Since the issue happens nearly identically on different targets, I
suspect the issue lies somewhere in fpu/softfloat.c.

** Affects: qemu
     Importance: Undecided
         Status: New

** Attachment added: "testcase reporting exceptions set by nextafter"
   
https://bugs.launchpad.net/bugs/1841442/+attachment/5284718/+files/nextafter.c

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1841442

Title:
  floating point emulation can fail to set FE_INEXACT

Status in QEMU:
  New

Bug description:
  Floating point emulation can fail to set FE_INEXACT in some
  circumstances. This shows up quite often in glibc's "math" tests.  A
  similar test is attached.

  On ppc64le native:
  --
  $ gcc nextafter.c -o nextafter -lm
  $ ./nextafter $(./nextafter)
  0x0000000000000001 0.000000
  0x0

  0xa000000
  FE_INEXACT FE_UNDERFLOW
  0x0000000000000000 0.000000
  --

  On x86_64:
  --
  $ gcc nextafter.c -o nextafter -lm
  $ ./nextafter $(./nextafter)
  0x0000000000000001 0.000000
  0x0

  0x30
  FE_INEXACT FE_UNDERFLOW 
  0x0000000000000000 0.000000
  --

  Using qemu-system-ppc64
  --
  $ ./nextafter $(./nextafter)
  0x0000000000000001 0.000000
  0x0

  0x8000000
  FE_UNDERFLOW 
  0x0000000000000000 0.000000
  --

  Using qemu-x86_64:
  --
  $ ./nextafter $(./nextafter)
  0x0000000000000001 0.000000
  0x0

  0x0

  0x0000000000000000 0.000000
  --

  QEMU versions vary, but not too much, and are pretty close to git HEAD:
  - 586f3dced9 (HEAD -> master, origin/master, origin/HEAD) Merge 
remote-tracking branch 'remotes/cohuck/tags/s390x-20190822' into staging
  - 864ab31 Update version for v4.1.0-rc4 release

  Since the issue happens nearly identically on different targets, I
  suspect the issue lies somewhere in fpu/softfloat.c.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1841442/+subscriptions



reply via email to

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