Perturb the malloc output during tests
Perturb the malloc output during tests

Set the environment variable MALLOC_PERTURB_ during tests to perturb the
output from OPENSSL_malloc() calls (see the mallopt man page for details
about this environment variable). This could be a low cost way of spotting
uninit reads in "make test" runs in some situations.

In tests I have found it to be a little unreliable (sometimes it seemed to
not perturb the output for inexplicable reasons) - but since this is easy
to implement I think it is worthwhile.

Reviewed-by: Tomas Mraz <2bc6038c3dfca09b2da23c8b6da8ba884dc2dcc2@openssl.org>
Reviewed-by: Paul Dale <ddec78389666b4f7c9b4d110380c848489a3e4aa@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17768)

openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl