bug-rcs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: simple valgrind test found what appear to be serious memory problems


From: Thien-Thi Nguyen
Subject: Re: simple valgrind test found what appear to be serious memory problems
Date: Thu, 30 Sep 2010 17:10:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

() Paul Eggert <address@hidden>
() Thu, 30 Sep 2010 00:41:47 -0700

   After building the git version of tar, I tried a very simple
   test, namely I used "rlog" on an RCS file I had lying around,
   running it under valgrind.  This found several problems, some
   of which appear to be serious.  The number of problems in what
   should be an easy test to pass suggests that a code audit
   needs to be done.

This prompted me to install valgrind and try it out for myself.
One of the advices in the manual is to fix the problems in the
order presented.  Like the output you posted, the first problem
appears to be "conditional jump or move depends on uninitialised
values" in grok_all (b-grok.c:794).  Running valgrind with the
option --db-attach=yes, then typing y RET to have gdb attach to
it, then examining values => things look as they should; i.e., i
don't see the problem implied by that message.

I decided to relate that to you in case you have any tips on
reducing the valgrind false positives.  I suppose we can write
a series of "suppressions" in the process of this audit, but
that sounds like a lot of work, and could furthermore mask
real problems due to (my) inexpertise w/ the tool...

Now i will grep the net for valgrind + obstacks, as i suspect
this (relatively) unconventional dynamic memory allocation scheme
is not as well supported as the standard malloc+munge+free usage.
Non-paired free is a feature (info "(libc) Freeing Obstack Objects").



reply via email to

[Prev in Thread] Current Thread [Next in Thread]