build: Disable dtrace probes under static analysis

The macros for the probes confuse the static analyser, and are often
called with arguments which the analyser things shouldn’t be used any
more (for example, the address of a block of memory which has just been
freed).

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1767
This commit is contained in:
Philip Withnall 2019-09-05 13:53:13 +01:00
parent 18a232be89
commit 0b4162e714
3 changed files with 9 additions and 3 deletions

View File

@ -25,7 +25,9 @@
#error "config.h must be included prior to gio_trace.h"
#endif
#ifdef HAVE_DTRACE
/* Ignore probes when doing static analysis, as they do weird things which
* confuses the analyser. */
#if defined(HAVE_DTRACE) && !defined(__clang_analyzer__)
/* include the generated probes header and put markers in code */
#include "gio_probes.h"

View File

@ -25,7 +25,9 @@
#error "config.h must be included prior to glib_trace.h"
#endif
#ifdef HAVE_DTRACE
/* Ignore probes when doing static analysis, as they do weird things which
* confuses the analyser. */
#if defined(HAVE_DTRACE) && !defined(__clang_analyzer__)
/* include the generated probes header and put markers in code */
#include "glib_probes.h"

View File

@ -25,7 +25,9 @@
#error "config.h must be included prior to gobject_trace.h"
#endif
#ifdef HAVE_DTRACE
/* Ignore probes when doing static analysis, as they do weird things which
* confuses the analyser. */
#if defined(HAVE_DTRACE) && !defined(__clang_analyzer__)
/* include the generated probes header and put markers in code */
#include "gobject_probes.h"