qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Bug 696834] Re: FP exception reporting not working on


From: Paul Goyette
Subject: Re: [Qemu-devel] [Bug 696834] Re: FP exception reporting not working on NetBSD host
Date: Tue, 10 Jan 2017 23:30:34 -0000

On Tue, 10 Jan 2017, Thomas Huth wrote:

> QEMU 0.13 is completely outdated nowadays - can you still reproduce this
> problem with the latest version of QEMU (currently version 2.8) ?

The test program running on qemu 2.8.0 now produces the expected results 
- 1 FP exception

You can close this bug.


+------------------+--------------------------+------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+

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

Title:
  FP exception reporting not working on NetBSD host

Status in QEMU:
  Incomplete

Bug description:
  I recognize that NetBSD is not one of the officially supported host
  OS.  However, qemu 0.13.0 is available in the NetBSD pkgsrc
  collection, and works quite well.  Well, with one exception (pun
  intended): It seems that Floating Point exceptions don't get reported
  properly.

  The following code-snippet demonstrates the problem:

  
  volatile int flt_signal = 0;

  static sigjmp_buf sigfpe_flt_env;
  static void
  sigfpe_flt_action(int signo, siginfo_t *info, void *ptr)
  {
          flt_signal++;
  }

  void trigger(void)
  {               
          struct sigaction sa;
          double d = strtod("0", NULL);
          
          if (sigsetjmp(sigfpe_flt_env, 0) == 0) {
                  sa.sa_flags = SA_SIGINFO;
                  sa.sa_sigaction = sigfpe_flt_action;
                  sigemptyset(&sa.sa_mask);
                  sigaction(SIGFPE, &sa, NULL);
                  fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL|FP_X_IMP);
                  printf("%g\n", 1 / d);
          }
          printf("FPE signal handler invoked %d times.\n");
  }

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



reply via email to

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