Re: [HACKERS] Tiny patch: sigmask.diff

2016-04-04 Thread Aleksander Alekseev
> Surely this fix is completely wrong? You'd have to touch every use of > signum() to do it like that. You'd also be introducing similarly- > undefined behavior at the other end of the loop, where this coding > would be asking to compute 1<<31, hence shifting into the sign bit, > which is

Re: [HACKERS] Tiny patch: sigmask.diff

2016-04-04 Thread Tom Lane
Aleksander Alekseev writes: > sigmask macro is defined in win32.h like this: > #define sigmask(sig) ( 1 << ((sig)-1) ) > And used in signal.c in this fashion: > for (i = 0; i < PG_SIGNAL_COUNT; i++) > if (exec_mask & sigmask(i)) > Thus during first