aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Valter <d-valter@yandex-team.com>2024-03-07 17:56:55 +0000
committerDamjan Marion <dmarion@0xa5.net>2024-03-12 16:52:01 +0000
commite2ed59933153d665ee43add2de03a581627b73fa (patch)
tree94eb6197cce67c32226f76aea27e63263bb29ff2 /src
parent28bd8f07d33bdd70c2cac03b70911a9069e4bd50 (diff)
vpp: set asan default options
set asan default options in vppctl and vpp_get_stats Type: improvement Signed-off-by: Dmitry Valter <d-valter@yandex-team.com> Change-Id: I58e1ae1c91f4a62e80eaf4e16e9932d8bab17c74
Diffstat (limited to 'src')
-rw-r--r--src/vpp/app/vpp_get_stats.c10
-rw-r--r--src/vpp/app/vppctl.c10
2 files changed, 20 insertions, 0 deletions
diff --git a/src/vpp/app/vpp_get_stats.c b/src/vpp/app/vpp_get_stats.c
index 54d36abcbf2..1c3b9d9538d 100644
--- a/src/vpp/app/vpp_get_stats.c
+++ b/src/vpp/app/vpp_get_stats.c
@@ -19,6 +19,7 @@
#include <vpp-api/client/stat_client.h>
#include <vlib/vlib.h>
+#include <vpp/vnet/config.h>
static int
stat_poll_loop (u8 ** patterns)
@@ -110,6 +111,15 @@ enum stat_client_cmd_e
STAT_CLIENT_CMD_TIGHTPOLL,
};
+#ifdef CLIB_SANITIZE_ADDR
+/* default options for Address Sanitizer */
+const char *
+__asan_default_options (void)
+{
+ return VPP_SANITIZE_ADDR_OPTIONS;
+}
+#endif /* CLIB_SANITIZE_ADDR */
+
int
main (int argc, char **argv)
{
diff --git a/src/vpp/app/vppctl.c b/src/vpp/app/vppctl.c
index 5b93cec8229..8c3495b3304 100644
--- a/src/vpp/app/vppctl.c
+++ b/src/vpp/app/vppctl.c
@@ -32,7 +32,9 @@
#define TELOPTS
#endif
+#include <vppinfra/clib.h>
#include <arpa/telnet.h>
+#include <vpp/vnet/config.h>
#define SOCKET_FILE "/run/vpp/cli.sock"
@@ -160,6 +162,14 @@ process_input (int sock_fd, unsigned char *rx_buf, int rx_buf_len,
return j;
}
+#ifdef CLIB_SANITIZE_ADDR
+/* default options for Address Sanitizer */
+const char *
+__asan_default_options (void)
+{
+ return VPP_SANITIZE_ADDR_OPTIONS;
+}
+#endif /* CLIB_SANITIZE_ADDR */
int
main (int argc, char *argv[])