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
This commit is contained in:
Andrew Tridgell 2018-12-05 07:32:05 +11:00
parent debea191c9
commit acf379cd77

View File

@ -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")