Thread (117 messages) 117 messages, 11 authors, 2021-11-03

Re: [dpdk-dev] [PATCH v10 1/4] Enable ASan for memory detector on DPDK

From: Mcnamara, John <hidden>
Date: 2021-10-19 09:02:46

-----Original Message-----
From: Peng, ZhihongX <redacted>
Sent: Friday, October 15, 2021 3:28 PM
To: david.marchand@redhat.com; Burakov, Anatoly
[off-list ref]; Ananyev, Konstantin
[off-list ref]; stephen@networkplumber.org; Dumitrescu,
Cristian [off-list ref]; Mcnamara, John
[off-list ref]
Cc: dev@dpdk.org; Lin, Xueqin <redacted>; Peng, ZhihongX
[off-list ref]
Subject: [PATCH v10 1/4] Enable ASan for memory detector on DPDK

From: Zhihong Peng <redacted>

`AddressSanitizer

Good work on this. It is a good initiative. Some comments on the docs below.

quoted hunk ↗ jump to hunk
diff --git a/doc/guides/prog_guide/asan.rst
b/doc/guides/prog_guide/asan.rst new file mode 100644 index
0000000000..b732288af3
--- /dev/null
+++ b/doc/guides/prog_guide/asan.rst
@@ -0,0 +1,35 @@
+.. Copyright (c) <2021>, Intel Corporation
+   All rights reserved.
+
+Memory error detect standard tool - AddressSanitizer(ASan)
+==========================================================
+
+`AddressSanitizer
+<https://github.com/google/sanitizers/wiki/AddressSanitizer>` (ASan) is
There are a number of minor doc and grammar issues in the rst for this patch. Rather than going through each one here is a rework of the asan.rst with these issues fixed:

..  SPDX-License-Identifier: BSD-3-Clause
    Copyright(c) 2021 Intel Corporation

Running Address Sanitizer
==========================================================

`AddressSanitizer
<https://github.com/google/sanitizers/wiki/AddressSanitizer>`_ (ASan)
is a widely-used debugging tool for detecting memory access errors.
It helps detect issues like use-after-free, various kinds of buffer
overruns and similar errors, as well as printing out detailed debug
information whenever an error is detected.

To enable ASan in the meson build system, use following meson build
command:

Example usage:

* gcc::

      meson build -Dbuildtype=debug -Db_sanitize=address
      ninja -C build

* clang::

      meson build -Dbuildtype=debug -Db_lundef=false -Db_sanitize=address
      ninja -C build

AddressSanitizer is a part of LLVM (3.1+) and GCC (4.8+).

.. Note::

  a) To compile with gcc in Centos, libasan needs to be installed separately.
  b) If the program being tested uses cmdline you will need to execute the
     "stty echo" command when a error occurs.




quoted hunk ↗ jump to hunk
diff --git a/doc/guides/prog_guide/index.rst
b/doc/guides/prog_guide/index.rst index 2dce507f46..df8a4b93e1 100644
--- a/doc/guides/prog_guide/index.rst
+++ b/doc/guides/prog_guide/index.rst
@@ -71,3 +71,4 @@ Programmer's Guide
     lto
     profile_app
     glossary
+    asan

The asan file should go before "glossary" and after "profile_app". 

quoted hunk ↗ jump to hunk
diff --git a/doc/guides/rel_notes/release_21_11.rst
b/doc/guides/rel_notes/release_21_11.rst
index 4c56cdfeaa..b6c4174dc6 100644
--- a/doc/guides/rel_notes/release_21_11.rst
+++ b/doc/guides/rel_notes/release_21_11.rst
@@ -159,6 +159,15 @@ New Features
   * Added tests to verify tunnel header verification in IPsec inbound.
   * Added tests to verify inner checksum.

+* **Enable ASan for memory detector on DPDK.**
Change to "**Enable ASan Address Sanitization.**"

+
+  `AddressSanitizer
+  <https://github.com/google/sanitizers/wiki/AddressSanitizer>` (ASan)
This text should match the edited text above.

John

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help