public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/106374] New: -fanalyzer ICE with certain const static vars
@ 2022-07-20 20:52 dmalcolm at gcc dot gnu.org
  2022-07-20 20:53 ` [Bug analyzer/106374] " dmalcolm at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2022-07-20 20:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106374
           Summary: -fanalyzer  ICE with certain const static vars
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: dmalcolm at gcc dot gnu.org
            Blocks: 106358
  Target Milestone: ---

I'm seeing an ICE in -fanalyzer on the Linux kernel's fs/crypto/hkdf.c in
function hkdf_extract.

Reduced reproducer:

typedef unsigned char u8;
extern int foo(const u8 *key, unsigned int keylen);
int test (void)
{
  static const u8 default_salt[64];
  return foo(default_salt, 64);
}

It's an assertion failure here:

1106    binding_cluster::binding_cluster (const region *base_region)
1107    : m_base_region (base_region), m_map (),
1108      m_escaped (false), m_touched (false)
1109    {
1110      gcc_assert (base_region->tracked_p ());
1111    }

I'm working on a fix.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106358
[Bug 106358] [meta-bug] tracker bug for building the Linux kernel with
-fanalyzer

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug analyzer/106374] -fanalyzer  ICE with certain const static vars
  2022-07-20 20:52 [Bug analyzer/106374] New: -fanalyzer ICE with certain const static vars dmalcolm at gcc dot gnu.org
@ 2022-07-20 20:53 ` dmalcolm at gcc dot gnu.org
  2022-07-21  1:39 ` [Bug analyzer/106374] [13 Regression] " cvs-commit at gcc dot gnu.org
  2022-07-21  1:44 ` dmalcolm at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2022-07-20 20:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-07-20
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
I added the assertion in r13-1761-g68871a008e686d.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug analyzer/106374] [13 Regression] -fanalyzer ICE with certain const static vars
  2022-07-20 20:52 [Bug analyzer/106374] New: -fanalyzer ICE with certain const static vars dmalcolm at gcc dot gnu.org
  2022-07-20 20:53 ` [Bug analyzer/106374] " dmalcolm at gcc dot gnu.org
@ 2022-07-21  1:39 ` cvs-commit at gcc dot gnu.org
  2022-07-21  1:44 ` dmalcolm at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-07-21  1:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 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:a6c192e80a87efbe6c0641f25a963c7bee9990fb

commit r13-1773-ga6c192e80a87efbe6c0641f25a963c7bee9990fb
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Wed Jul 20 21:34:03 2022 -0400

    analyzer: fix ICE on untracked decl_regions [PR106374]

    gcc/analyzer/ChangeLog:
            PR analyzer/106374
            * region.cc (decl_region::get_svalue_for_initializer): Bail out on
            untracked regions.

    gcc/testsuite/ChangeLog:
            PR analyzer/106374
            * gcc.dg/analyzer/untracked-2.c: New test.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug analyzer/106374] [13 Regression] -fanalyzer ICE with certain const static vars
  2022-07-20 20:52 [Bug analyzer/106374] New: -fanalyzer ICE with certain const static vars dmalcolm at gcc dot gnu.org
  2022-07-20 20:53 ` [Bug analyzer/106374] " dmalcolm at gcc dot gnu.org
  2022-07-21  1:39 ` [Bug analyzer/106374] [13 Regression] " cvs-commit at gcc dot gnu.org
@ 2022-07-21  1:44 ` dmalcolm at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2022-07-21  1:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Fixed on trunk by the above commit.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-21  1:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-20 20:52 [Bug analyzer/106374] New: -fanalyzer ICE with certain const static vars dmalcolm at gcc dot gnu.org
2022-07-20 20:53 ` [Bug analyzer/106374] " dmalcolm at gcc dot gnu.org
2022-07-21  1:39 ` [Bug analyzer/106374] [13 Regression] " cvs-commit at gcc dot gnu.org
2022-07-21  1:44 ` dmalcolm at gcc dot gnu.org

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).