+2020-02-24 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/93032
+ * doc/invoke.texi (-Wnanalyzer-tainted-array-index): Note that
+ -fanalyzer-checker=taint is also required.
+ (-fanalyzer-checker=): Note that providing this option enables the
+ given checker, and doing so may be required for checkers that are
+ disabled by default.
+
2020-02-24 David Malcolm <dmalcolm@redhat.com>
* doc/invoke.texi (-fanalyzer-verbosity=): "2" only shows
+2020-02-24 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/93032
+ * sm.cc (make_checkers): Require the "taint" checker to be
+ explicitly enabled.
+
2020-02-24 David Malcolm <dmalcolm@redhat.com>
PR analyzer/93899
{
out.safe_push (make_malloc_state_machine (logger));
out.safe_push (make_fileptr_state_machine (logger));
- out.safe_push (make_taint_state_machine (logger));
+ /* The "taint" checker must be explicitly enabled (as it currently
+ leads to state explosions that stop the other checkers working). */
+ if (flag_analyzer_checker)
+ out.safe_push (make_taint_state_machine (logger));
out.safe_push (make_sensitive_state_machine (logger));
out.safe_push (make_signal_state_machine (logger));
@item -Wno-analyzer-tainted-array-index
@opindex Wanalyzer-tainted-array-index
@opindex Wno-analyzer-tainted-array-index
-This warning requires @option{-fanalyzer}, which enables it; use
-@option{-Wno-analyzer-tainted-array-index} to disable it.
+This warning requires both @option{-fanalyzer} and
+@option{-fanalyzer-checker=taint} to enable it;
+use @option{-Wno-analyzer-tainted-array-index} to disable it.
This diagnostic warns for paths through the code in which a value
that could be under an attacker's control is used as the index
@item -fanalyzer-checker=@var{name}
@opindex fanalyzer-checker
-Restrict the analyzer to run just the named checker.
+Restrict the analyzer to run just the named checker, and enable it.
+
+Some checkers are disabled by default (even with @option{-fanalyzer}),
+such as the @code{taint} checker that implements
+@option{-Wanalyzer-tainted-array-index}, and this option is required
+to enable them.
@item -fanalyzer-fine-grained
@opindex fanalyzer-fine-grained
+2020-02-24 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/93032
+ * gcc.dg/analyzer/pr93382.c: Add "-fanalyzer-checker=taint".
+ * gcc.dg/analyzer/taint-1.c: Likewise.
+
2020-02-24 David Malcolm <dmalcolm@redhat.com>
PR analyzer/93899
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
typedef __SIZE_TYPE__ size_t;
int idx;
+/* { dg-additional-options "-fanalyzer-checker=taint" } */
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>