http://bugzilla.novell.com/show_bug.cgi?id=933903
Avi Cohen Stuart changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |---
--- Comment #5 from Avi Cohen Stuart ---
Hi,
if I remove the FE_INEXACT and only leave the FE_INVALID I still get a core
dump due to a floating point exception.
Note that you need the memset which messes up with the xmm registers to get
invalid values.
It is not related to the FE_INEXACT.
Avi.
#include
#include
#include
#include
#include
#include
#include
/* compile with:
gcc t.c -g -o ./t -lm
*/
int main(int argc, char **argv)
{
char *buf;
long lval;
double dval;
sigset_t sigset;
sigemptyset(&sigset);
sigaddset(&sigset, SIGFPE);
sigprocmask(SIG_UNBLOCK, &sigset, NULL);
feenableexcept(FE_INVALID);
buf = malloc(4096);
/* this memset corrupts a part of xmm0 and fills it with 0xe5 */
memset(buf, 0xe5, 4096);
lval = 2;
/*
* in exp() the instruction cvttpd2dq is used using values from
* xmm0
* part of the xmm1 cannot convert to a int and raises the exception
*/
dval = exp( (double) lval );
return 0;
}
--
You are receiving this mail because:
You are on the CC list for the bug.