Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.