maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #00130
Re: [patch 06/11] Suppress a false alarm in Valgrind about a leak in inet_ntoa on glibc 2.7.
Hi!
>>>>> "knielsen" == knielsen <knielsen@xxxxxxxxxxxxxxx> writes:
knielsen> === modified file 'mysql-test/valgrind.supp'
knielsen> ---
knielsen> mysql-test/valgrind.supp | 16 ++++++++++++++++
knielsen> 1 file changed, 16 insertions(+)
knielsen> Index: mysql-test/valgrind.supp
knielsen> ===================================================================
knielsen> --- mysql-test/valgrind.supp.orig 2009-04-07 13:42:12.000000000 +0200
knielsen> +++ mysql-test/valgrind.supp 2009-04-07 13:42:14.000000000 +0200
knielsen> @@ -601,3 +601,19 @@
knielsen> fun:dlopen*
knielsen> }
knielsen> +#
knielsen> +# In glibc (checked version 2.7), inet_ntoa allocates an 18-byte
knielsen> +# per-thread static buffer for the return value. That memory is freed
knielsen> +# at thread exit, however if called from the main thread, Valgrind
knielsen> +# does not see the free (test main.no-threads).
knielsen> +#
knielsen> +# Since inet_ntoa() does not allocate memory dynamically per-call, this
knielsen> +# suppression is safe.
knielsen> +#
knielsen> +
knielsen> +{
knielsen> + inet_ntoa thread local storage
knielsen> + Memcheck:Leak
knielsen> + fun:malloc
knielsen> + fun:inet_ntoa
knielsen> +}
Ok (Good comment)
Regards,
Monty
References