postgresql/src
Tom Lane 6c20bdb2a2 Further tweak memory management for regex DFAs.
Coverity is still unhappy after commit 190c79884, and after looking
closer I think it might be onto something.  The callers of newdfa()
typically drop out if v->err has been set nonzero, which newdfa()
is faithfully doing if it fails.  However, what if v->err was already
nonzero before we entered newdfa()?  Then newdfa() could succeed and
the caller would promptly leak its result.

I don't think this scenario can actually happen, but the predicate
"v->err is always zero when newdfa() is called" seems difficult to be
entirely sure of; there's a good deal of code that potentially could
get that wrong.

It seems better to adjust the callers to directly check for a null
result instead of relying on ISERR() tests.  This is slightly cheaper
than the previous coding anyway.

Lacking evidence that there's any real bug, no back-patch.
2021-03-08 16:32:29 -05:00
..
backend Further tweak memory management for regex DFAs. 2021-03-08 16:32:29 -05:00
bin pgbench: Simplify some port, host, user and dbname assignments 2021-03-06 21:26:34 +09:00
common pg_upgrade: Check version of target cluster binaries 2021-03-03 09:45:56 +01:00
fe_utils Generalize parallel slot result handling. 2021-02-05 16:08:45 -05:00
include Add bit_xor aggregate function 2021-03-06 19:28:05 +01:00
interfaces Avoid extra newline in errors received in FE protocol version 2. 2021-03-04 10:56:33 +02:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Remove extra increment of plpgsql's statement counter for FOR loops. 2021-02-02 14:35:12 -05:00
port Use sort_template.h for qsort() and qsort_arg(). 2021-03-03 17:02:32 +13:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Add bit_xor aggregate function 2021-03-06 19:28:05 +01:00
timezone Update time zone data files to tzdata release 2021a. 2021-01-24 16:29:47 -05:00
tools Add support for PROVE_TESTS and PROVE_FLAGS in MSVC scripts 2021-03-05 10:12:49 +09:00
tutorial Doc, more or less: uncomment tutorial example that was fixed long ago. 2021-01-13 16:00:03 -05:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Introduce --with-ssl={openssl} as a configure option 2021-02-01 19:19:44 +09:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00