diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2018-06-26 10:09:29 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2018-06-26 10:12:19 +0200 |
commit | dbe905c140d0cd347c731f63b153dca53857bdc9 (patch) | |
tree | 2cf6f3f80a35da723f5f7963efe0263dd43f04cb | |
parent | 3dc89bbafe75f559b2f5b4a70d60983fe4a9c96e (diff) | |
download | newlib-dbe905c140d0cd347c731f63b153dca53857bdc9.zip newlib-dbe905c140d0cd347c731f63b153dca53857bdc9.tar.gz newlib-dbe905c140d0cd347c731f63b153dca53857bdc9.tar.bz2 |
Cygwin: exceptions: fix FPE exception flags
The FPE flags for divisions by zero were not implemented
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | winsup/cygwin/exceptions.cc | 8 | ||||
-rw-r--r-- | winsup/cygwin/release/2.11.0 | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 77eff05..419b097 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -649,9 +649,15 @@ exception::handle (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in, /* Coerce win32 value to posix value. */ switch (e->ExceptionCode) { - case STATUS_FLOAT_DENORMAL_OPERAND: case STATUS_FLOAT_DIVIDE_BY_ZERO: + si.si_signo = SIGFPE; + si.si_code = FPE_FLTDIV; + break; + case STATUS_FLOAT_DENORMAL_OPERAND: case STATUS_FLOAT_INVALID_OPERATION: + si.si_signo = SIGFPE; + si.si_code = FPE_FLTINV; + break; case STATUS_FLOAT_STACK_CHECK: si.si_signo = SIGFPE; si.si_code = FPE_FLTSUB; diff --git a/winsup/cygwin/release/2.11.0 b/winsup/cygwin/release/2.11.0 index ef7d082..33f5fb9 100644 --- a/winsup/cygwin/release/2.11.0 +++ b/winsup/cygwin/release/2.11.0 @@ -33,3 +33,6 @@ Bug Fixes - Fix a g++ compilation problem with -std=c++14 or -std=c++17. Addresses: https://cygwin.com/ml/cygwin/2018-05/msg00316.html + +- Fix FPE flag handling for division by zero conditions + Addresses: https://cygwin.com/ml/cygwin/2018-06/msg00281.html |