FP exception reporting not working on NetBSD host
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
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_
{
}
void trigger(void)
{
struct sigaction sa;
double d = strtod("0", NULL);
if (sigsetjmp(
}
printf("FPE signal handler invoked %d times.\n");
}
On Mon, Jan 3, 2011 at 12:14 PM, Paul Goyette <email address hidden>wrote:
> Public bug reported: flt_action( int signo, siginfo_t *info, void *ptr) sigfpe_ flt_env, 0) == 0) { &sa.sa_ mask); FP_X_INV| FP_X_DZ| FP_X_OFL| FP_X_UFL| FP_X_IMP) ;
>
> 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_signal++;
> }
>
> void trigger(void)
> {
> struct sigaction sa;
> double d = strtod("0", NULL);
>
> if (sigsetjmp(
> sa.sa_flags = SA_SIGINFO;
> sa.sa_sigaction = sigfpe_flt_action;
> sigemptyset(
> sigaction(SIGFPE, &sa, NULL);
> fpsetmask(
> printf("%g\n", 1 / d);
> }
> printf("FPE signal handler invoked %d times.\n");
>
this printf() does miss an argument :-)
> } /bugs.launchpad .net/bugs/ 696834 flt_action( int signo, siginfo_t *info, void *ptr) sigfpe_ flt_env, 0) == 0) { &sa.sa_ mask); FP_X_INV| FP_X_DZ| FP_X_OFL| FP_X_UFL| FP_X_IMP) ;
>
> ** Affects: qemu
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are a member of qemu-
> devel-ml, which is subscribed to QEMU.
> https:/
>
> Title:
> FP exception reporting not working on NetBSD host
>
> Status in QEMU:
> New
>
> 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_signal++;
> }
>
> void trigger(void)
> {
> struct sigaction sa;
> double d = strtod("0", NULL);
>
> if (sigsetjmp(
> sa.sa_flags = SA_SIGINFO;
> sa.sa_sigaction = sigfpe_flt_action;
> sigemptyset(
> sigaction(SIGFPE, &sa, NULL);
> fpsetmask(
> printf("%g\n", 1 / d);
> }
> printf("FPE signal handler invoked %d times.\n");
>
this printf() does miss an argument :-)
> }
>
>
>
>