#include <stdint.h>
#include <rte_eal.h>
+#include <rte_errno.h>
#include <rte_memory.h>
#include <rte_common.h>
#include <rte_memzone.h>
* - Try to read all memory; it should not segfault.
*/
+/*
+ * ASan complains about accessing unallocated memory.
+ * See: https://bugs.dpdk.org/show_bug.cgi?id=880
+ */
+__rte_no_asan
static int
check_mem(const struct rte_memseg_list *msl __rte_unused,
const struct rte_memseg *ms, void *arg __rte_unused)
/* ENOTSUP means segment is valid, but there is not support for
* segment fd API (e.g. on FreeBSD).
*/
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
/* all other errors are treated as failures */
return -1;
/* we're able to get memseg fd - try getting its offset */
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
}