Broad valgrind run

Niels Möller nisse at lysator.liu.se
Sun Jun 7 14:09:07 UTC 2015


tg at gmplib.org (Torbjörn Granlund) writes:

> I am not familiar with the valgrind annotations you're using and what
> benefits they might bring.  It would be nice to not require code
> annotations, as these take time to write, debug and maintain.

Here's one example

https://git.lysator.liu.se/nettle/nettle/blob/master/testsuite/memxor-test.c

But in most cases it's good enough to allocate every area with malloc
and let valgrind do its thing. I'm not sure exactly what it does, but by
default there seems to be some red-zone around each malloc:ed area.

Annotations can be useful when playing with alignment, like in the
above example, or when an allocated area is explicitly off-limits. E.g.,
marking the area between _mp_size and _mp_alloc in our mpz objects.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list