Commit Graph

11 Commits

Author SHA1 Message Date
Noah Misch 4ad6f13500 Copyedit comments and documentation. 2016-04-01 21:53:10 -04:00
Andres Freund 2f1f443930 Add valgrind suppressions for python code.
Python's allocator does some low-level tricks for efficiency;
unfortunately they trigger valgrind errors. Those tricks can be disabled
making instrumentation easier; but few people testing postgres will have
such a build of python. So add broad suppressions of the resulting
errors.

See also https://svn.python.org/projects/python/trunk/Misc/README.valgrind

This possibly will suppress valid errors, but without it it's basically
impossible to use valgrind with plpython code.

Author: Andres Freund
Backpatch: 9.4, where we started to maintain valgrind suppressions
2016-03-08 19:40:58 -08:00
Andres Freund 5e43bee830 Add valgrind suppressions for bootstrap related code.
Author: Andres Freund
Backpatch: 9.4, where we started to maintain valgrind suppressions
2016-03-08 19:40:58 -08:00
Andres Freund 241f088f36 Adjust valgrind suppressions wrt 025c02420. 2015-03-15 17:37:07 +01:00
Andres Freund 72950dc1d0 Adjust valgrind suppression to the changes in 2c03216d83.
CRC computation is now done in XLogRecordAssemble.
2014-12-18 10:45:57 +01:00
Andres Freund 6c878edc1d Add valgrind suppression for pg_atomic_init_u64.
pg_atomic_init_u64 (indirectly) uses compare/exchange to guarantee
atomic writes on platforms where compare/exchange is available, but
64bit writes aren't atomic (yes, those exist). That leads to a
harmless read of the initial value of variable.
2014-11-14 16:59:33 +01:00
Andres Freund 473f162ce1 Adapt valgrind.supp to the XLogInsert() split.
The CRC computation now happens in XLogInsertRecord(), not
XLogInsert() itself anymore.
2014-11-14 00:59:40 +01:00
Andres Freund 9a0a12f683 Add valgrind suppression for padding bytes in twophase records. 2014-09-01 15:59:44 +02:00
Noah Misch 5a90ac29c4 Add Valgrind suppression for reorderbuffer padding bytes.
Andres Freund
2014-05-12 23:03:49 -04:00
Tom Lane 9a9473f3cc Prevent using strncpy with src == dest in TupleDescInitEntry.
The C and POSIX standards state that strncpy's behavior is undefined when
source and destination areas overlap.  While it remains dubious whether any
implementations really misbehave when the pointers are exactly equal, some
platforms are now starting to force the issue by complaining when an
undefined call occurs.  (In particular OS X 10.9 has been seen to dump core
here, though the exact set of circumstances needed to trigger that remain
elusive.  Similar behavior can be expected to be optional on Linux and
other platforms in the near future.)  So tweak the code to explicitly do
nothing when nothing need be done.

Back-patch to all active branches.  In HEAD, this also lets us get rid of
an exception in valgrind.supp.

Per discussion of a report from Matthias Schmitt.
2013-10-28 20:49:24 -04:00
Noah Misch 19085116ee 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.
2013-06-26 20:22:25 -04:00