[Bug math/21035] New: longjmp() resets FPU exception mask
nyh at math dot technion.ac.il
sourceware-bugzilla@sourceware.org
Tue Jan 10 00:32:00 GMT 2017
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.
More information about the Glibc-bugs
mailing list