From: Andreas Ericsson Date: Sat, 02 Oct 2010 16:30:25 GMT Subject: Re: [PATCH 2/7] lockfile: introduce alloc_lock_file() to avoid valgrind noise Message-ID: <4CA75E21.1090407@op5.se> In-Reply-To: <20101002083216.GC29638@burratino> 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 andreas.ericsson@op5.se 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.