4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-18 15:09:32 +08:00

Cygwin: let feraiseexcept actually raise an exception

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>
This commit is contained in:
Corinna Vinschen 2023-10-31 13:07:36 +01:00
parent 60d1eeac6c
commit 2ef627c46e
2 changed files with 4 additions and 1 deletions

View File

@ -534,7 +534,7 @@ fegetround NOSIGFE
feholdexcept SIGFE
feof SIGFE
feof_unlocked SIGFE
feraiseexcept SIGFE
feraiseexcept NOSIGFE
ferror SIGFE
ferror_unlocked SIGFE
fesetenv SIGFE

View 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