Patchwork [committed] Fix use of uninitialized wi fields (PR debug/45419)

login
register
mail settings
Submitter Jakub Jelinek
Date Aug. 30, 2010, 5:22 p.m.
Message ID <20100830172220.GC1269@tyan-ft48-01.lab.bos.redhat.com>
Download mbox | patch
Permalink /patch/63102/
State New
Headers show

Comments

Jakub Jelinek - Aug. 30, 2010, 5:22 p.m.
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.


	Jakub

Patch

--- 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;