Project

General

Profile

Actions

Bug #1740

closed

Linux emulation: -ffast-math causes floating point exception

Added by Johannes.Hofmann about 14 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Kernel
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Some Linux binaries compiled with -ffast-math crash with floating
point exception. There also is a warning in dmesg:

FXRSTR: illegal FP MXCSR 00009fc0 didinit = 0

This is a bit unfortunate as for some reason the procps package
(pkill, pgrep, uptime, etc) is compiled with the -ffast-math switch
and the utilities crash.

The following mini-program shows the crash when compiled with
-ffast-math (as Linux binary):

#include <stdio.h>

int main(int argc, char **argv) {
double d;

scanf("%lf", &d);
printf("%f\n", d);
}
Actions

Also available in: Atom PDF