From acf379cd77b59784682cb56465adc2d17c79f42e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 5 Dec 2018 07:32:05 +1100 Subject: [PATCH] autotest: allow sim_vehicle with valgrind to cope with new operator this is needed for recent versions of valgrind. Without it valgrind doesn't know that new clears memory --- Tools/autotest/sim_vehicle.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/sim_vehicle.py b/Tools/autotest/sim_vehicle.py index 3b131b611e..f0e4c0253b 100755 --- a/Tools/autotest/sim_vehicle.py +++ b/Tools/autotest/sim_vehicle.py @@ -538,7 +538,10 @@ def start_vehicle(binary, autotest, opts, stuff, loc): cmd = [] if opts.valgrind: cmd_name += " (valgrind)" - cmd.append("valgrind") + # adding this option allows valgrind to cope with the overload + # of operator new + valgrind_opts = "--soname-synonyms=somalloc=nouserintercepts" + cmd.append("valgrind " + valgrind_opts) if opts.callgrind: cmd_name += " (callgrind)" cmd.append("valgrind --tool=callgrind")