public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug analyzer/96798] Analyzer failures on Darwin
Date: Fri, 11 Sep 2020 01:09:19 +0000	[thread overview]
Message-ID: <bug-96798-4-SvgjUedAOZ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96798-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96798

--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>:

https://gcc.gnu.org/g:b7028f060c6760b336b416897412e327ded12ab5

commit r11-3130-gb7028f060c6760b336b416897412e327ded12ab5
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Mon Aug 31 15:55:45 2020 -0400

    analyzer: stricter handling of non-pure builtins [PR96798]

    Amongst other things PR analyzer/96798 notes that
    region_model::on_call_pre treats any builtin that hasn't been coded
    yet as a no-op (albeit with an unknown return value), which is wrong
    for non-pure builtins.

    This patch updates that function's handling of such builtins so that it
    instead conservatively assumes that any escaped/reachable regions can
    be affected by the call, and implements enough handling of specific
    builtins to avoid regressing the testsuite (I hope).

    gcc/analyzer/ChangeLog:
            PR analyzer/96798
            * region-model-impl-calls.cc (region_model::impl_call_memcpy):
            New.
            (region_model::impl_call_strcpy): New.
            * region-model.cc (region_model::on_call_pre): Flag unhandled
            builtins that are non-pure as having unknown side-effects.
            Implement BUILT_IN_MEMCPY, BUILT_IN_MEMCPY_CHK, BUILT_IN_STRCPY,
            BUILT_IN_STRCPY_CHK, BUILT_IN_FPRINTF, BUILT_IN_FPRINTF_UNLOCKED,
            BUILT_IN_PUTC, BUILT_IN_PUTC_UNLOCKED, BUILT_IN_FPUTC,
            BUILT_IN_FPUTC_UNLOCKED, BUILT_IN_FPUTS, BUILT_IN_FPUTS_UNLOCKED,
            BUILT_IN_FWRITE, BUILT_IN_FWRITE_UNLOCKED, BUILT_IN_PRINTF,
            BUILT_IN_PRINTF_UNLOCKED, BUILT_IN_PUTCHAR,
            BUILT_IN_PUTCHAR_UNLOCKED, BUILT_IN_PUTS, BUILT_IN_PUTS_UNLOCKED,
            BUILT_IN_VFPRINTF, BUILT_IN_VPRINTF.
            * region-model.h (region_model::impl_call_memcpy): New decl.
            (region_model::impl_call_strcpy): New decl.

    gcc/testsuite/ChangeLog:
            PR analyzer/96798
            * gcc.dg/analyzer/memcpy-1.c: New test.
            * gcc.dg/analyzer/strcpy-1.c: New test.

  parent reply	other threads:[~2020-09-11  1:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26 12:48 [Bug analyzer/96798] New: " dominiq at lps dot ens.fr
2020-08-27 22:49 ` [Bug analyzer/96798] " dmalcolm at gcc dot gnu.org
2020-08-27 23:30 ` dominiq at lps dot ens.fr
2020-08-28 10:10 ` dmalcolm at gcc dot gnu.org
2020-08-28 11:20 ` dominiq at lps dot ens.fr
2020-08-28 22:39 ` dominiq at lps dot ens.fr
2020-08-29  0:58 ` dmalcolm at gcc dot gnu.org
2020-08-29  7:02 ` iains at gcc dot gnu.org
2020-08-29  7:21 ` iains at gcc dot gnu.org
2020-08-29  7:22 ` iains at gcc dot gnu.org
2020-08-31 22:31 ` cvs-commit at gcc dot gnu.org
2020-08-31 22:32 ` cvs-commit at gcc dot gnu.org
2020-08-31 22:47 ` dmalcolm at gcc dot gnu.org
2020-09-11  1:09 ` cvs-commit at gcc dot gnu.org [this message]
2020-09-11  1:13 ` dmalcolm at gcc dot gnu.org

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=bug-96798-4-SvgjUedAOZ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).