Beta binary

Linus Torvalds torvalds at linux-foundation.org
Thu Nov 28 11:29:07 UTC 2013


On Thu, Nov 28, 2013 at 10:48 AM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
> I suspect we need to start running valgrind again..

In case people care, this (whitesace-damaged) patch gets rid of some
valgrind warnings about conditional jumps on uninitialized variables,
but they are harmless (we do an early check against the end of the
string in order to avoid doing a more expensive memcmp).

diff --git a/parse-xml.c b/parse-xml.c
index 76a737f8f01d..9da1f3ebac67 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -1551,7 +1551,7 @@ static const char *nodename(xmlNode *node, char
*buf, int len)
 static void visit_one_node(xmlNode *node)
 {
        char *content;
-       char buffer[MAXNAME];
+       static char buffer[MAXNAME];
        const char *name;

        content = node->content;

but I get a *lot* or warnings from valgrind deep in Qt. Most of them
seem to be about 4-byte accesses that go past the end of a string,
which is almost certainly the usual "somebody just optimized a string
function to work a word at a time" issue. I think Thiago at some point
said that SuSE had better annotations for some of these things.

Anyway, nothing really obvious shows up with valgrind, but it might be
hidden in the noise..

          Linus


More information about the subsurface mailing list