On 06/18/2012 05:50 PM, Caolán McNamara wrote:
I bet this is one if the false-positive occasions where valgrind isn't
aware of one of the strlen performance hacks IIRC where glibc knows that
it can get away with traversing that strdup's memory block in 4byte
chunks in its strlen e.g. someone with a 4/8 character length username
wouldn't see it :-)

So... if you just changed the strlen to be aUser.getLength() + 1 would
that silence valgrind too ?

As it happened, I ran into this false valgrind warning now, too, and addressed it with <http://cgit.freedesktop.org/libreoffice/core/commit/?id=97beabccb73321a8d2e022705afa755f15e99fa0> "http://cgit.freedesktop.org/libreoffice/core/commit/?id=97beabccb73321a8d2e022705afa755f15e99fa0."; (Argh, now that I re-read your above suggestion, using rtl::OString::getLength would really have been nicer than rtl_str_getLength. Anyway...)

Stephan
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to