public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/5768] New: isnan() will throw SIGFPE with signalling NaN
@ 2008-02-18 23:05 sjmunroe at us dot ibm dot com
2008-02-18 23:08 ` [Bug math/5768] " sjmunroe at us dot ibm dot com
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2008-02-18 23:05 UTC (permalink / raw)
To: glibc-bugs
On powerpc the default implementation uses:
savedstate = fegetenv_register ();
reset_fpscr_bit (FPSCR_VE);
result = !(x == x);
fesetenv_register (savedstate);
return result;
But with GCC-4.1+ there is no dependency to prevent GCC from moving the
fesetenv_register() [mtfsf] ahead of the (x==x) [fcmpu f1,f1]. In the default
mode this is not a problem. but if FE_INVALID is enabled and a signaling NaN is
passed to isnan() we will get a SIGFPE.
--
Summary: isnan() will throw SIGFPE with signalling NaN
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P3
Component: math
AssignedTo: aj at suse dot de
ReportedBy: sjmunroe at us dot ibm dot com
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: powerpc64-*-linux
GCC host triplet: powerpc64-*-linux
GCC target triplet: powerpc64-*-linux and powerpc-*-linux
http://sourceware.org/bugzilla/show_bug.cgi?id=5768
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug math/5768] isnan() will throw SIGFPE with signalling NaN
2008-02-18 23:05 [Bug math/5768] New: isnan() will throw SIGFPE with signalling NaN sjmunroe at us dot ibm dot com
@ 2008-02-18 23:08 ` sjmunroe at us dot ibm dot com
2008-02-18 23:12 ` sjmunroe at us dot ibm dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2008-02-18 23:08 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From sjmunroe at us dot ibm dot com 2008-02-18 23:07 -------
Created an attachment (id=2270)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=2270&action=view)
Test case for signalling NaNs
Compile with:
gcc -O2 -g -std=gnu99 -fno-builtin test-isnan.c -lm -o test-isnan
--
http://sourceware.org/bugzilla/show_bug.cgi?id=5768
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug math/5768] isnan() will throw SIGFPE with signalling NaN
2008-02-18 23:05 [Bug math/5768] New: isnan() will throw SIGFPE with signalling NaN sjmunroe at us dot ibm dot com
2008-02-18 23:08 ` [Bug math/5768] " sjmunroe at us dot ibm dot com
@ 2008-02-18 23:12 ` sjmunroe at us dot ibm dot com
2008-02-18 23:21 ` sjmunroe at us dot ibm dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2008-02-18 23:12 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From sjmunroe at us dot ibm dot com 2008-02-18 23:12 -------
For powerpc[64] isnan() and isnanf() fail since they share the same
implementation. isnanl() is Ok because it uses the generic implementation from
/ieee754/ldbl-128ibm/. isinf, isfinite, isnormal, and fpclassify are also OK.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
http://sourceware.org/bugzilla/show_bug.cgi?id=5768
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug math/5768] isnan() will throw SIGFPE with signalling NaN
2008-02-18 23:05 [Bug math/5768] New: isnan() will throw SIGFPE with signalling NaN sjmunroe at us dot ibm dot com
2008-02-18 23:08 ` [Bug math/5768] " sjmunroe at us dot ibm dot com
2008-02-18 23:12 ` sjmunroe at us dot ibm dot com
@ 2008-02-18 23:21 ` sjmunroe at us dot ibm dot com
2008-02-22 21:38 ` sjmunroe at us dot ibm dot com
2008-04-10 14:18 ` drepper at redhat dot com
4 siblings, 0 replies; 7+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2008-02-18 23:21 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From sjmunroe at us dot ibm dot com 2008-02-18 23:20 -------
Created an attachment (id=2271)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=2271&action=view)
Patch to replace the failing isnan.c with correct isnan.S implementation
This is simple enough to write in assembler and prevent GCC from rearranging
the code.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=5768
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug math/5768] isnan() will throw SIGFPE with signalling NaN
2008-02-18 23:05 [Bug math/5768] New: isnan() will throw SIGFPE with signalling NaN sjmunroe at us dot ibm dot com
` (2 preceding siblings ...)
2008-02-18 23:21 ` sjmunroe at us dot ibm dot com
@ 2008-02-22 21:38 ` sjmunroe at us dot ibm dot com
2008-04-10 14:18 ` drepper at redhat dot com
4 siblings, 0 replies; 7+ messages in thread
From: sjmunroe at us dot ibm dot com @ 2008-02-22 21:38 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From sjmunroe at us dot ibm dot com 2008-02-22 21:37 -------
Created an attachment (id=2289)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=2289&action=view)
Add Signalling NaN test to make check
This patch adds a signaling NaN test to make check
--
http://sourceware.org/bugzilla/show_bug.cgi?id=5768
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug math/5768] isnan() will throw SIGFPE with signalling NaN
2008-02-18 23:05 [Bug math/5768] New: isnan() will throw SIGFPE with signalling NaN sjmunroe at us dot ibm dot com
` (3 preceding siblings ...)
2008-02-22 21:38 ` sjmunroe at us dot ibm dot com
@ 2008-04-10 14:18 ` drepper at redhat dot com
4 siblings, 0 replies; 7+ messages in thread
From: drepper at redhat dot com @ 2008-04-10 14:18 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2008-04-10 14:18 -------
Changes applied to cvs.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=5768
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug math/5768] isnan() will throw SIGFPE with signalling NaN
[not found] <bug-5768-131@http.sourceware.org/bugzilla/>
@ 2014-07-02 7:26 ` fweimer at redhat dot com
0 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2014-07-02 7:26 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=5768
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-07-02 7:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-18 23:05 [Bug math/5768] New: isnan() will throw SIGFPE with signalling NaN sjmunroe at us dot ibm dot com
2008-02-18 23:08 ` [Bug math/5768] " sjmunroe at us dot ibm dot com
2008-02-18 23:12 ` sjmunroe at us dot ibm dot com
2008-02-18 23:21 ` sjmunroe at us dot ibm dot com
2008-02-22 21:38 ` sjmunroe at us dot ibm dot com
2008-04-10 14:18 ` drepper at redhat dot com
[not found] <bug-5768-131@http.sourceware.org/bugzilla/>
2014-07-02 7:26 ` fweimer at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).