On Tue, Jun 15, 2021 at 1:46 PM <zhihongx.p...@intel.com> wrote: > > From: Zhihong Peng <zhihongx.p...@intel.com> > > AddressSanitizer (ASan) is a google memory error detect > standard tool. It could help to detect use-after-free and > {heap,stack,global}-buffer overflow bugs in C/C++ programs, > print detailed error information when error happens, large > improve debug efficiency. > > By referring to its implementation algorithm > (https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm), > ported heap-buffer-overflow and use-after-freefunctions to dpdk. > > Here is an example of heap-buffer-overflow bug: > ...... > char *p = rte_zmalloc(NULL, 7, 0); > p[7] = 'a'; > ...... > > Here is an example of use-after-free bug: > ...... > char *p = rte_zmalloc(NULL, 7, 0); > rte_free(p); > *p = 'a'; > ...... > > If you want to use this feature, > you need to use the following compilation options: > -Db_lundef=false -Db_sanitize=address
# Thanks for this patch. It is a useful item. # Subject could be changed from: porting AddressSanitizer feature to DPDK to eal: support for AddressSanitizer or so # Could you add a section in the documentation for Sanitizers to document the build time option and other points that users need to know. We can add other sanitizers such as UBSan etc in the future here # Add a UT test case to make sure it is working in app/test or so. # Also, Please update the release note for this feature.