Skip to content

Commit

Permalink
Create DEBUG.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
skinkie authored Nov 16, 2019
1 parent 4074063 commit 2c8866b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions DEBUG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
In the past we did some quite extensive work using Coverity and the Static Analyzer of gcc and clang.
In recent bughunting by LogicalTrust an interesting approach using AddressSanitizer was presented for in depth debugging that would only be partly available under Valgrind conditions.
To make memory violations directly visible consider consider compiling Cherokee using:

.. code-block:: bash
ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes LDFLAGS="-lasan" LDADD="-lasan" CFLAGS="-fsanitize=address -ggdb -O0 -fprofile-arcs -ftest-coverage" ./configure --prefix=`pwd`/bin --enable-trace --enable-static-module=all --enable-static --enable-shared=no
Or the variant without threading:

.. code-block:: bash
ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes LDFLAGS="-lasan" LDADD="-lasan" CFLAGS="-fsanitize=address -ggdb -O0 -fprofile-arcs -ftest-coverage" ./configure --prefix=`pwd`/bin --enable-trace --enable-static-module=all --enable-static --enable-shared=no --disable-pthread

0 comments on commit 2c8866b

Please sign in to comment.