Simon Josefsson simon@josefsson.org writes:
However, as far as I recall, the Nettle library does not contain any calls to malloc or other memory allocating functions. So I don't think there could be any memory leaks from the library?
The publickey functions which use gmp allocate memory for the bignums (unfortunately). There may even be some leaks there in the form of missing mpz_clear, so testing for memory leaks would be useful. The functions using nettle_buffer (mainly sexp_format) may allocate, depending on how the buffer is initialized.
But if it is a small effort, and it leads to being able to run all the testsuite under valgrind without any warnings, I would support doing it.
I don't think it's a big deal to get the testsuite to deallocate storage. Not a very high priority for me, though.
I think we should also modify the use of $EMULATOR to make it easier to run with valgrind (mainly, remove quoting when it's expanded for the shell), and perhaps rename it to TESTS_ENVIRONMENT for consistency with projects using automake.
Regards, /Niels