From patchwork Mon Aug 30 17:22:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 63102 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 74885B70EB for ; Tue, 31 Aug 2010 03:22:32 +1000 (EST) Received: (qmail 1574 invoked by alias); 30 Aug 2010 17:22:29 -0000 Received: (qmail 1553 invoked by uid 22791); 30 Aug 2010 17:22:28 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, TW_TM, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 30 Aug 2010 17:22:23 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7UHMLnG014856 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 30 Aug 2010 13:22:21 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7UHMKju005315 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 30 Aug 2010 13:22:20 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id o7UHMK8Z025918 for ; Mon, 30 Aug 2010 19:22:20 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id o7UHMKJc025916 for gcc-patches@gcc.gnu.org; Mon, 30 Aug 2010 19:22:20 +0200 Date: Mon, 30 Aug 2010 19:22:20 +0200 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] Fix use of uninitialized wi fields (PR debug/45419) Message-ID: <20100830172220.GC1269@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 PR debug/45419 * tree-ssa-live.c (dump_enumerated_decls): Clear the whole wi variable. Jakub --- 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;