postgresql/src
Tom Lane 3644ac04c1 Fix latent portability issue in pgwin32_dispatch_queued_signals().
The first iteration of the signal-checking loop would compute sigmask(0)
which expands to 1<<(-1) which is undefined behavior according to the
C standard.  The lack of field reports of trouble suggest that it
evaluates to 0 on all existing Windows compilers, but that's hardly
something to rely on.  Since signal 0 isn't a queueable signal anyway,
we can just make the loop iterate from 1 instead, and save a few cycles
as well as avoiding the undefined behavior.

In passing, avoid evaluating the volatile expression UNBLOCKED_SIGNAL_QUEUE
twice in a row; there's no reason to waste cycles like that.

Noted by Aleksander Alekseev, though this isn't his proposed fix.
Back-patch to all supported branches.
2016-04-04 11:13:26 -04:00
..
backend Fix latent portability issue in pgwin32_dispatch_queued_signals(). 2016-04-04 11:13:26 -04:00
bin Translation updates 2016-03-28 08:44:53 +02:00
common pgindent run for 9.5 2015-05-23 21:35:49 -04:00
include Stamp 9.5.2. 2016-03-28 16:07:39 -04:00
interfaces Avoid possibly-unsafe use of Windows' FormatMessage() function. 2016-03-29 11:54:57 -04:00
makefiles Link $(WIN32RES) into single-file modules only when PGFILEDESC is set. 2015-08-05 20:45:21 -04:00
pl Translation updates 2016-03-28 08:44:53 +02:00
port Avoid possibly-unsafe use of Windows' FormatMessage() function. 2016-03-29 11:54:57 -04:00
template AIX: Test the -qlonglong option before use. 2015-07-17 03:01:29 -04:00
test Reset plan->row_security_env and planUserId 2016-03-28 09:03:41 -04:00
timezone Modernize zic's test for valid timezone abbreviations. 2016-03-26 15:59:14 -04:00
tools Remove dependency on psed for MSVC builds. 2016-03-19 18:44:04 -04:00
tutorial Remove no-longer-required function declarations. 2015-05-24 12:20:23 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Back-patch fixes to make TAP tests work on Windows. 2015-11-17 14:10:24 -05:00
Makefile.shlib AIX: Link TRANSFORM modules with their dependencies. 2015-07-15 21:00:30 -04:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00