This is the mail archive of the
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
Bug ID: 21035
Summary: longjmp() resets FPU exception mask
Assignee: unassigned at sourceware dot org
Reporter: nyh at math dot technion.ac.il
Target Milestone: ---
Created attachment 9745
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.