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/113999] [14 Regression] ICE: in string_cst_has_null_terminator, at analyzer/region-model.cc:3651 with -fanalyzer on gcc.dg/tree-ssa/strncpy-2.c
Date: Wed, 21 Feb 2024 00:46:43 +0000	[thread overview]
Message-ID: <bug-113999-4-SrJH82fKzb@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113999-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from GCC 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:0a6a5f8656ccf9a60ac516c68cd4eb40ff4630c4

commit r14-9091-g0a6a5f8656ccf9a60ac516c68cd4eb40ff4630c4
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Tue Feb 20 19:44:51 2024 -0500

    analyzer: handle array-initialization from a string_cst [PR113999]

    gcc/analyzer/ChangeLog:
            PR analyzer/113999
            * analyzer.h (get_string_cst_size): New decl.
            * region-model-manager.cc (get_string_cst_size): New.
            (region_model_manager::maybe_get_char_from_string_cst): Treat
            single-byte accesses within string_cst but beyond
            TREE_STRING_LENGTH as being 0.
            * region-model.cc (string_cst_has_null_terminator): Likewise.

    gcc/testsuite/ChangeLog:
            PR analyzer/113999
            * c-c++-common/analyzer/strlen-pr113999.c: New test.
            * gcc.dg/analyzer/strlen-1.c: More test coverage.

    Signed-off-by: David Malcolm <dmalcolm@redhat.com>

  parent reply	other threads:[~2024-02-21  0:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 17:19 [Bug analyzer/113999] New: " zsojka at seznam dot cz
2024-02-19 19:07 ` [Bug analyzer/113999] " dmalcolm at gcc dot gnu.org
2024-02-20  8:10 ` rguenth at gcc dot gnu.org
2024-02-21  0:46 ` cvs-commit at gcc dot gnu.org [this message]
2024-02-21  0:52 ` 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-113999-4-SrJH82fKzb@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).