[Libvir] [patch 1/5] iptables: fix invalid free

Jim Meyering jim at meyering.net
Wed Mar 21 15:38:00 UTC 2007

Mark McLoughlin <markmc at redhat.com> wrote:

> On Wed, 2007-03-21 at 16:24 +0100, Jim Meyering wrote:
>> Mark McLoughlin <markmc at redhat.com> wrote:
>> ...
>> >   - If our wrappers always zero-initialise, we don't need the
>> >     "initialise to -1 when debugging" thing.
>> You probably already know, but if your wrappers always initialize,
>> that can mask used-uninitialized.  So it's best if the initialization
>> is only optional, so you can test (i.e. via valgrind) with it turned off.
> 	It doesn't mask used-uninitialised if it always initialises. If it
> always initialises, then how can it be even be used uninitialised? :-)

Hi Mark,

I interpret "wrappers", above, to mean more than just a calloc-like wrapper.

A malloc (not calloc, of course) wrapper that always initializes can
mask what would have otherwise been a used-uninitialised error, and what
would still be a logical U.I. error.

More information about the libvir-list mailing list