Subject: Re: [PATCH v3] test-lib.sh: Use GLIBC_TUNABLES instead of MALLOC_CHECK_ on glibc >= 2.34

From: Junio C Hamano <[email-masked]>
Date: Fri, 04 Mar 2022 11:59:02 -0800

Elia Pinto <[email-masked]> writes:

> In glibc >= 2.34 MALLOC_CHECK_ and MALLOC_PERTURB_ environment
> variables have been replaced by GLIBC_TUNABLES.  Also the new
> glibc requires that you preload a library called libc_malloc_debug.so
> to get these features.
>
> Using the ordinary glibc system variable detect if this is glibc >= 2.34 and
> use GLIBC_TUNABLES and the new library.
>
> This patch was inspired by a Richard W.M. Jones ndbkit patch
>
> Helped-by: Junio C Hamano <[email-masked]>
> Signed-off-by: Elia Pinto <[email-masked]>
> ---
> This is the third version of the patch.
>
> Compared to the second version[1], the code is further simplified,
> eliminating a case statement and modifying a string statement.

Thanks; will queue.  Let's declare victory and merge it down to
'next' and 'master/main'.