Perturb the malloc output during tests
authorMatt Caswell <matt@openssl.org>
Thu, 24 Feb 2022 16:20:14 +0000 (16:20 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 3 Mar 2022 13:36:21 +0000 (13:36 +0000)
commitc1b364cee39029e7c37ea97804d22c248a40d582
treed3a64282eef4ca357befcf7166f7dfede4fd7162
parent0176fc78d090210cd7e231a7c2c4564464509506
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 <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17768)
test/run_tests.pl