pgsql: Cooperate with the Valgrind instrumentation framework. - Mailing list pgsql-committers

From Noah Misch
Subject pgsql: Cooperate with the Valgrind instrumentation framework.
Date
Msg-id E1Us0B6-0007jq-LC@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Cooperate with the Valgrind instrumentation framework.

Valgrind "client requests" in aset.c and mcxt.c teach Valgrind and its
Memcheck tool about the PostgreSQL allocator.  This makes Valgrind
roughly as sensitive to memory errors involving palloc chunks as it is
to memory errors involving malloc chunks.  Further client requests in
PageAddItem() and printtup() verify that all bits being added to a
buffer page or furnished to an output function are predictably-defined.
Those tests catch failures of C-language functions to fully initialize
the bits of a Datum, which in turn stymie optimizations that rely on
_equalConst().  Define the USE_VALGRIND symbol in pg_config_manual.h to
enable these additions.  An included "suppression file" silences nominal
errors we don't plan to fix.

Reviewed in earlier versions by Peter Geoghegan and Korry Douglas.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/19085116eeecfde0a3fc1611eaffccc35bcec204

Modified Files
--------------
src/backend/access/common/printtup.c |   18 ++++
src/backend/storage/page/bufpage.c   |   15 +++
src/backend/tcop/postgres.c          |    5 +
src/backend/utils/mmgr/aset.c        |  170 +++++++++++++++++++++++++++++++++-
src/backend/utils/mmgr/mcxt.c        |   13 +++
src/include/pg_config_manual.h       |   19 +++-
src/include/utils/memdebug.h         |   34 +++++++
src/tools/valgrind.supp              |   94 +++++++++++++++++++
8 files changed, 361 insertions(+), 7 deletions(-)


pgsql-committers by date:

Previous
From: Noah Misch
Date:
Subject: pgsql: Document effect of constant folding on CASE.
Next
From: Noah Misch
Date:
Subject: pgsql: Document effect of constant folding on CASE.