Re: memory-related bugs

From: Noah Misch <noah(at)leadboat(dot)com>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: memory-related bugs
Date: 2011-03-13 09:09:49
Message-ID: 20110313090949.GA29508@tornado.gateway.2wire.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Mar 12, 2011 at 04:08:23PM +0000, Greg Stark wrote:
> On Sat, Mar 12, 2011 at 1:32 PM, Noah Misch <noah(at)leadboat(dot)com> wrote:
> > A suitably-instrumented run of "make installcheck-world" under valgrind turned
> > up a handful of memory-related bugs:
>
>
> Nice work. How did you instrument things so valgrind knew about palloc
> et al? I remember trying this in the past and running into problems.

I peppered aset.c and mcxt.c with various calls to the valgrind hook macros. I
believe the set of hooks has grown recently (I use valgrind 3.6.0), so it may be
that the right facilities didn't exist at that time.

> I
> think the biggest one was that we write out structs to disk including
> padding so trigger lots of reads of uninitialized data warnings.

I used suppressions for call sites that write WAL or pgstat structures. Tuples
are, with limited exceptions, fully-initialized, so I did validate those.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2011-03-13 09:10:21 Re: memory-related bugs
Previous Message Tom Lane 2011-03-12 23:06:33 Re: Collations versus user-defined functions