]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: let feraiseexcept actually raise an exception
authorCorinna Vinschen <corinna@vinschen.de>
Tue, 31 Oct 2023 12:07:36 +0000 (13:07 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Tue, 31 Oct 2023 12:29:15 +0000 (13:29 +0100)
The exception handling inside of Cygwin functions marked as SIGFE
covers exceptions and lets the library code handle them gracefully.
If these functions want to raise an exception, they have to send a
signal explicitely via raise(3).

That's not what we want in feraiseexcept(). It triggers a floating
point exception explicitely by calling the i387 op "fwait".  Being
marked as SIGFE, this exception will be suppressed and the normal
exception handling won't kick in.

Fix this by moving feraiseexcept into the NOSIGFE realm.

Fixes: 0f81b5d4bcaa ("* Makefile.in (DLL_OFILES): Add new fenv.o module.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/cygwin.din
winsup/cygwin/release/3.4.10

index be404263e605efa99c8cb61de89ba82e7adfed04..c70380fe83fbf5b4a9e89297fb2ccb40dd57ba53 100644 (file)
@@ -532,7 +532,7 @@ fegetround NOSIGFE
 feholdexcept SIGFE
 feof SIGFE
 feof_unlocked SIGFE
-feraiseexcept SIGFE
+feraiseexcept NOSIGFE
 ferror SIGFE
 ferror_unlocked SIGFE
 fesetenv SIGFE
index c75283991461715c63dc5cd945a5baa2efd03cb4..ec28cdf7e79172765f8ec418b28c278c7144a047 100644 (file)
@@ -6,3 +6,6 @@ Bug Fixes
 
 - Fix hang in process initialization if cwd is unreadable.
   Addresses: https://cygwin.com/pipermail/cygwin/2023-October/254604.html
+
+- Let feraiseexcept actually raise an exception.
+  Addresses: https://cygwin.com/pipermail/cygwin/2023-October/254667.html
This page took 0.032304 seconds and 5 git commands to generate.