https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98564
Bug ID: 98564
Summary: valgrind error with -fanalyzer
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: analyzer
Assignee: dmalcolm at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
For this one line of C source code:
void a(void) { int b = calloc(0, 1); }
compiled by recent gcc trunk, built with valgrind, does this:
$ /home/dcb/gcc/results.20210105.valgrind/bin/gcc -fanalyzer -c -w bug687.c
==65008== Conditional jump or move depends on uninitialised value(s)
==65008== at 0xF7DD7F: ana::exploded_path::feasible_p(ana::logger*,
ana::feas
ibility_problem**, ana::engine*, ana::exploded_graph const*) const
(engine.cc:34
84)
==65008== by 0x1733AA4: ana::dedupe_winners::add(ana::logger*,
shortest_paths
<ana::eg_traits, ana::exploded_path> const&, ana::exploded_graph const*,
ana::sa
ved_diagnostic*) (diagnostic-manager.cc:465)
==65008== by 0x1731EF3:
ana::diagnostic_manager::emit_saved_diagnostics(ana::
exploded_graph const&) (diagnostic-manager.cc:616)
==65008== by 0xF87B77: ana::impl_run_checkers(ana::logger*) (engine.cc:4752)
This bug exists since sometime before 20201206, with git hash 8c23434fdadcf4ca.