Subject: Re: [PATCH 2/7] lockfile: introduce alloc_lock_file() to avoid valgrind noise

From: Andreas Ericsson <[email-masked]>
Date: Sat, 02 Oct 2010 18:30:25 +0200

On 10/02/2010 10:32 AM, Jonathan Nieder wrote:
> 
> Add a alloc_lock_file() helper to make such tolerance easier.
> Allocations made through this helper function will not be reported as
> leaks by valgrind even if there is no corresponding free().  The
> ((optimize("-fno-optimize-sibling-calls"))) attribute is needed on
> platforms with GCC to ensure that the stack frame for
> alloc_lock_file() is not replaced by the stack frame for xcalloc().
> 

So we're basically increasing runtime to shut up a leakchecking tool
and also making that leakchecking tool falsely not report positives.
Hmm...

-- 
Andreas Ericsson                   [email-masked]
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.