public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/marxin/heads/revert-sphinx-v2)] Partially revert d777b38cde91a87f2345dcd13901862a9513562a
Date: Mon, 14 Nov 2022 03:03:39 +0000 (GMT)	[thread overview]
Message-ID: <20221114030339.818593832364@sourceware.org> (raw)

https://gcc.gnu.org/g:18543974e971ee5a5bdde196cb5ff124d58003d4

commit 18543974e971ee5a5bdde196cb5ff124d58003d4
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Nov 14 03:54:31 2022 +0100

    Partially revert d777b38cde91a87f2345dcd13901862a9513562a
    
    gcc/ChangeLog:
    
            * doc/gcc/gcc-command-options/option-summary.rst: Revert.
            * doc/gcc/gcc-command-options/options-that-control-static-analysis.rst: Revert.

Diff:
---
 gcc/doc/gcc/gcc-command-options/option-summary.rst |  1 -
 .../options-that-control-static-analysis.rst       | 60 ----------------------
 2 files changed, 61 deletions(-)

diff --git a/gcc/doc/gcc/gcc-command-options/option-summary.rst b/gcc/doc/gcc/gcc-command-options/option-summary.rst
index b90b6600d70..d068f98feac 100644
--- a/gcc/doc/gcc/gcc-command-options/option-summary.rst
+++ b/gcc/doc/gcc/gcc-command-options/option-summary.rst
@@ -309,7 +309,6 @@ in the following sections.
   :option:`-Wno-analyzer-shift-count-overflow` |gol|
   :option:`-Wno-analyzer-stale-setjmp-buffer` |gol|
   :option:`-Wno-analyzer-tainted-allocation-size` |gol|
-  :option:`-Wno-analyzer-tainted-assertion` |gol|
   :option:`-Wno-analyzer-tainted-array-index` |gol|
   :option:`-Wno-analyzer-tainted-divisor` |gol|
   :option:`-Wno-analyzer-tainted-offset` |gol|
diff --git a/gcc/doc/gcc/gcc-command-options/options-that-control-static-analysis.rst b/gcc/doc/gcc/gcc-command-options/options-that-control-static-analysis.rst
index 18f73d95e1e..32a626c16a9 100644
--- a/gcc/doc/gcc/gcc-command-options/options-that-control-static-analysis.rst
+++ b/gcc/doc/gcc/gcc-command-options/options-that-control-static-analysis.rst
@@ -549,66 +549,6 @@ Options That Control Static Analysis
 
   Default setting; overrides :option:`-Wno-analyzer-tainted-allocation-size`.
 
-.. option:: -Wno-analyzer-tainted-assertion
-
-  This warning requires both :option:`-fanalyzer` and
-  :option:`-fanalyzer-checker=taint` to enable it;
-  use :option:`-Wno-analyzer-tainted-assertion` 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 part of a
-  condition without being first sanitized, and that condition guards a
-  call to a function marked with attribute :fn-attr:`noreturn`
-  (such as the function ``__builtin_unreachable``).  Such functions
-  typically indicate abnormal termination of the program, such as for
-  assertion failure handlers.  For example:
-
-  .. code-block:: c
-
-    assert (some_tainted_value < SOME_LIMIT);
-
-  In such cases:
-
-  * when assertion-checking is enabled: an attacker could trigger
-    a denial of service by injecting an assertion failure
-
-  * when assertion-checking is disabled, such as by defining ``NDEBUG``,
-    an attacker could inject data that subverts the process, since it
-    presumably violates a precondition that is being assumed by the code.
-
-  Note that when assertion-checking is disabled, the assertions are
-  typically removed by the preprocessor before the analyzer has a chance
-  to "see" them, so this diagnostic can only generate warnings on builds
-  in which assertion-checking is enabled.
-
-  For the purpose of this warning, any function marked with attribute
-  :fn-attr:`noreturn` is considered as a possible assertion failure
-  handler, including ``__builtin_unreachable``.  Note that these functions
-  are sometimes removed by the optimizer before the analyzer "sees" them.
-  Hence optimization should be disabled when attempting to trigger this
-  diagnostic.
-
-  See `CWE-617: Reachable Assertion <https://cwe.mitre.org/data/definitions/617.html>`_.
-
-  The warning can also report problematic constructions such as
-
-  .. code-block:: c
-
-     switch (some_tainted_value) {
-     case 0:
-       /* [...etc; various valid cases omitted...] */
-       break;
-
-     default:
-       __builtin_unreachable (); /* BUG: attacker can trigger this  */
-     }
-
-  despite the above not being an assertion failure, strictly speaking.
-
-.. option:: -Wanalyzer-tainted-assertion
-
-  Default setting; overrides :option:`-Wno-analyzer-tainted-assertion`.
-
 .. option:: -Wno-analyzer-tainted-array-index
 
   This warning requires both :option:`-fanalyzer` and

                 reply	other threads:[~2022-11-14  3:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221114030339.818593832364@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).