This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix use of uninitialized wi fields (PR debug/45419)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 30 Aug 2010 19:22:20 +0200
- Subject: [committed] Fix use of uninitialized wi fields (PR debug/45419)
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162156
added walking without fully initialized automatic wi variable,
so e.g. valgrind complains about that.
Fixed by doing what other places do, bootstrapped/regtested on x86_64-linux
and i686-linux, committed to trunk as obvious.
2010-08-30 Jakub Jelinek <jakub@redhat.com>
PR debug/45419
* tree-ssa-live.c (dump_enumerated_decls): Clear the whole wi variable.
--- gcc/tree-ssa-live.c.jj 2010-08-20 16:05:41.000000000 +0200
+++ gcc/tree-ssa-live.c 2010-08-30 14:51:14.000000000 +0200
@@ -1250,8 +1250,8 @@ dump_enumerated_decls (FILE *file, int f
struct walk_stmt_info wi;
VEC (numbered_tree, heap) *decl_list = VEC_alloc (numbered_tree, heap, 40);
+ memset (&wi, '\0', sizeof (wi));
wi.info = (void*) decl_list;
- wi.pset = NULL;
FOR_EACH_BB (bb)
{
gimple_stmt_iterator gsi;
Jakub