[dpdk-dev] [PATCH] Enable AddressSanitizer feature on DPDK

Stephen Hemminger stephen at networkplumber.org
Fri Sep 10 04:47:56 CEST 2021


On Fri, 10 Sep 2021 02:01:47 +0000
zhihongx.peng at intel.com wrote:

>  
> +if get_option('b_sanitize').startswith('address')
> +	cflags += '-DRTE_MALLOC_ASAN'
> +endif
> +

This looks great, but can we make it just do-the-right-thing
and get rid of the nerd knobs (i.e no meson configure).

The address sanitizer already has a way to detect if enabled.

GCC uses:
__SANITIZE_ADDRESS__

Clang uses:
#if defined(__has_feature)
#  if __has_feature(address_sanitizer)


More information about the dev mailing list