This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/21035] New: longjmp() resets FPU exception mask
- From: "nyh at math dot technion.ac.il" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 10 Jan 2017 00:32:22 +0000
- Subject: [Bug math/21035] New: longjmp() resets FPU exception mask
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=21035
Bug ID: 21035
Summary: longjmp() resets FPU exception mask
Product: glibc
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: math
Assignee: unassigned at sourceware dot org
Reporter: nyh at math dot technion.ac.il
Target Milestone: ---
Created attachment 9745
--> https://sourceware.org/bugzilla/attachment.cgi?id=9745&action=edit
Code demonstrating this problem (C++)
I wrote a small test for feenablexcept() which enables an FPU exception (e.g.,
FE_DIVBYZERO), makes it happen (dividing 1.0 by 0.0), catches the exception,
and longjmp()s to return from the test. See code below.
However, it turns out that longjmp(), very unexpectedly, resets the exception
mask back to zero! So after an feenableexcept() we'll get one exception and
longjmp, but a second division by zero will no longer generate a signal.
Code demonstrating this problem attached.
--
You are receiving this mail because:
You are on the CC list for the bug.