public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug analyzer/112889] ICE with -fanalyzer seen on Linux kernel drivers/infiniband/hw/cxgb4/cm.c
Date: Wed, 06 Dec 2023 21:17:34 +0000	[thread overview]
Message-ID: <bug-112889-4-sZgKdMb9Ei@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112889-4@http.gcc.gnu.org/bugzilla/>

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

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-12-06

--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Happens for a concrete_binding 2 bits below the start of the base region, due
to:

172           bool ins = Traits::is_empty (*e);
173           if (ins)
174             {
175               e->m_key = k;
176               new ((void *)&e->m_value) Value (v);
177               gcc_checking_assert (!Traits::is_empty (*e)
178                                    && !Traits::is_deleted (*e));
179             }

(gdb) call b.dump(true)
start: -2, size: 1, next: -1

(gdb) p k.is_empty()
$6 = true
(gdb) p k.is_deleted()
$7 = false

where concrete_binding has:
  void mark_deleted () { m_bit_range.m_start_bit_offset = -1; }
  void mark_empty () { m_bit_range.m_start_bit_offset = -2; }
  bool is_deleted () const { return m_bit_range.m_start_bit_offset == -1; }
  bool is_empty () const { return m_bit_range.m_start_bit_offset == -2; }

Possibly also affects the "1 bit before the base region" case as well.

Working on a fix to use the size field for the deleted/empty values.

It's a failing assertion, so may well be present (but latent) in older
releases.

  reply	other threads:[~2023-12-06 21:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-06 20:56 [Bug analyzer/112889] New: " dmalcolm at gcc dot gnu.org
2023-12-06 21:17 ` dmalcolm at gcc dot gnu.org [this message]
2023-12-08  0:44 ` [Bug analyzer/112889] " cvs-commit at gcc dot gnu.org
2023-12-08  0:49 ` dmalcolm at gcc dot gnu.org
2024-02-15 17:42 ` [Bug analyzer/112889] [11/12/13 Regression] " dmalcolm at gcc dot gnu.org
2024-04-14  5:04 ` pinskia at gcc dot gnu.org
2024-05-09 17:11 ` cvs-commit at gcc dot gnu.org
2024-05-09 17:52 ` [Bug analyzer/112889] [11/12 " 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-112889-4-sZgKdMb9Ei@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).