]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
analyzer: fix uninitialized bitmap [PR112955]
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 11 Dec 2023 21:18:56 +0000 (16:18 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Mon, 11 Dec 2023 21:18:56 +0000 (16:18 -0500)
In r14-5566-g841008d3966c0f I added a new ctor for
feasibility_state, but failed to call bitmap_clear
on m_snodes_visited.

Fixed thusly.

gcc/analyzer/ChangeLog:
PR analyzer/112955
* engine.cc (feasibility_state::feasibility_state): Initialize
m_snodes_visited.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/analyzer/engine.cc

index d2524e34f586ab7b4e0786057536471ab79dcbcd..ed1e923743e5a1a02180421bfc75317aa7ac5bfb 100644 (file)
@@ -4875,6 +4875,7 @@ feasibility_state::feasibility_state (const region_model &model,
 : m_model (model),
   m_snodes_visited (sg.m_nodes.length ())
 {
+  bitmap_clear (m_snodes_visited);
 }
 
 feasibility_state &