postgresql/src/backend
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
..
access Fix typos in comments 2016-03-15 17:57:17 -03:00
bootstrap pgindent run for 9.5 2015-05-23 21:35:49 -04:00
catalog Split out pg_operator.h function declarations to new file pg_operator_fn.h. 2016-01-01 13:00:13 -05:00
commands Change comment to describe correct lock level used 2016-03-23 11:33:26 +00:00
executor Fix EvalPlanQual bug when query contains both locked and not-locked rels. 2016-03-22 17:56:06 -04:00
foreign Code review for foreign/custom join pushdown patch. 2015-05-10 14:36:36 -04:00
lib Avoid use of float arithmetic in bipartite_match.c. 2015-08-23 13:02:19 -04:00
libpq Avoid possibly-unsafe use of Windows' FormatMessage() function. 2016-03-29 11:54:57 -04:00
main Avoid crash on old Windows with AVX2-capable CPU for VS2013 builds 2016-03-10 14:10:32 +01:00
nodes Add defenses against putting expanded objects into Const nodes. 2016-01-21 12:55:59 -05:00
optimizer Fix incorrect varlevelsup in security_barrier_replace_vars(). 2016-02-29 12:31:25 +00:00
parser Remove new coupling between NAMEDATALEN and MAX_LEVENSHTEIN_STRLEN. 2016-01-22 11:53:06 -05:00
po Translation updates 2016-03-28 08:44:53 +02:00
port Fix latent portability issue in pgwin32_dispatch_queued_signals(). 2016-04-04 11:13:26 -04:00
postmaster Avoid unlikely data-loss scenarios due to rename() without fsync. 2016-03-09 18:53:53 -08:00
regex Suppress compiler warnings about useless comparison of unsigned to zero. 2016-02-15 17:11:52 -05:00
replication Fix broken variable declaration 2016-03-30 23:40:31 -03:00
rewrite Improve error message for rejecting RETURNING clauses with dropped columns. 2016-02-29 19:11:44 -05:00
snowball Remove no-longer-required function declarations. 2015-05-24 12:20:23 -04:00
storage Introduce durable_rename() and durable_link_or_rename(). 2016-03-09 18:53:53 -08:00
tcop Message style improvements 2015-10-28 20:23:53 -04:00
tsearch Fix not-terribly-safe coding in NIImportOOAffixes() and NIImportAffixes(). 2016-03-06 19:21:03 -05:00
utils Reset plan->row_security_env and planUserId 2016-03-28 09:03:41 -04:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile AIX: Link the postgres executable with -Wl,-brtllib. 2015-07-15 21:00:30 -04:00
nls.mk Translation updates 2015-02-01 23:23:40 -05:00