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