> >   http://valgrind.org/docs/manual/dist.readme-packagers.html

> The problem is that strlen() process data 4 bytes by 4 bytes, so it can 
> read up to 3 bytes more if the first byte is 0. That's why valgrind
> triggers here.

The page cited above says:

   Reason for this is that Valgrind's Memcheck tool needs to intercept
   calls to, and provide replacements for, some symbols in ld.so at
   startup (most importantly strlen).

Is valgrind failing to substitute its own strlen implementation for some
reason? It seems to be, as I'm getting errors from a simple function
like this:

        static void foo (void)
        {
                char init[4] = "abc";
                int i;

                i = strlen (init);
        }

that look like this:

        ==16169== Memcheck, a memory error detector
        ==16169== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et 
al.
        ==16169== Using Valgrind-3.5.0-Debian and LibVEX; rerun with -h for 
copyright info
        ==16169== Command: ./valgrind-test
          ==16169== 
        ==16169== Conditional jump or move depends on uninitialised value(s)
        ==16169==    at 0x6DB14D4: __strlen_sse2 (strlen.S:93)
        ==16169==    by 0x80483EC: main (valgrind-test.c:15)
        ==16169==  Uninitialised value was created by a stack allocation
        ==16169==    at 0x80483C7: foo (valgrind-test.c:5)

I would imagine that valgrind's substituted strlen wouldn't be named
__strlen_sse2, for example.

-Carl

-- 
carl.d.wo...@intel.com



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to