valgrinding with python stuff active

Norbert Thiebaud nthiebaud at gmail.com
Sat Sep 8 08:52:33 PDT 2012


On Fri, Sep 7, 2012 at 5:49 PM, julien2412 <serval2412 at yahoo.fr> wrote:
> on this page http://wiki.documentfoundation.org/Development/How_to_debug
> but what about if custom memory allocator is bugged? (BTW why do we use
> this? Historical reason?) Wouldn't Valgrind be helpful to detect it?
>
> I'm a bit lost here :-(

Julien,

A custom allocator will necessarily confuse valgrind...  the only way
to 'unconfuse' it would be to teach valgrind about it and have
valgrind emulate the allocation mechanism of the custom allocator to
keep track of what is 'logically' allocated/freed... doing that would
be quite complex and the odd of doing a bug in the emulation layer is
much higher than the odd that there is a bug in the custom allocator
to start with...

So, in general, when using valgrind you _do_ want to disable any
'custom allocator'. and yes that won't help you find a bug in the
allocator... but if you have a bug, think horse not zebra... 99.999%
of the time your bug will have nothing to do with the allocator
itself.

Norbert


More information about the LibreOffice mailing list