diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 494991140..bf78e2a98 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2015-02-23 Corinna Vinschen + + * winsup.h (SIGTOMASK): Add cast to sigset_t to avoid int overflow. + 2015-02-20 Corinna Vinschen * grp.cc (internal_getgroups): Take additional timeout_ns parameter. diff --git a/winsup/cygwin/release/1.7.35 b/winsup/cygwin/release/1.7.35 index 8c8c9962d..564698907 100644 --- a/winsup/cygwin/release/1.7.35 +++ b/winsup/cygwin/release/1.7.35 @@ -35,3 +35,6 @@ Bug Fixes - 64 bit: Export forgotten symbol __mempcpy. Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00394.html + +- 64 bit: Avoid misbehaviour in signal mask computation. + Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00665.html diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h index d61f6950f..4b549dde9 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h @@ -131,7 +131,7 @@ extern int cygserver_running; }) /* Convert a signal to a signal mask */ -#define SIGTOMASK(sig) (1 << ((sig) - 1)) +#define SIGTOMASK(sig) ((sigset_t) 1 << ((sig) - 1)) #define set_api_fatal_return(n) do {extern int __api_fatal_exit_val; __api_fatal_exit_val = (n);} while (0)