aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-06-06 16:38:14 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-06-06 17:06:33 +0200
commit5853f708864c969cf930ad863fef4286865e0310 (patch)
tree05a80b76e6918e8f31977058f31ff92820dbbd5a /meson.build
parentfedf9f1815d1d79d95c7d55678c463ec139adde8 (diff)
downloadslirp-5853f708864c969cf930ad863fef4286865e0310.zip
slirp-5853f708864c969cf930ad863fef4286865e0310.tar.gz
slirp-5853f708864c969cf930ad863fef4286865e0310.tar.bz2
mbuf: Add debugging helpers for allocation
This adds a few helpers for debugging mbuf allocations when running in debugging mode (lsan, valgrind, etc.) - We do not want to cache allocations, so always set M_DOFREE to prevent us from putting any mbuf in it. - We want to update the mbuf allocation owner on function call for more precise leak reporting. Based on Jeremy Marchand's fuzzing work. Signed-off-by: jeremy marchand <jeremy.marchand@etu.u-bordeaux.fr> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build4
1 files changed, 4 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 19d6775..4407a77 100644
--- a/meson.build
+++ b/meson.build
@@ -72,6 +72,10 @@ cargs = [
'-DG_LOG_DOMAIN="Slirp"',
]
+if cc.check_header('valgrind/valgrind.h')
+ cargs += [ '-DHAVE_VALGRIND=1' ]
+endif
+
sources = [
'src/arp_table.c',
'src/bootp.c',