From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31262 invoked by alias); 20 Nov 2014 19:41:04 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 31244 invoked by uid 48); 20 Nov 2014 19:41:00 -0000 From: "dmalcolm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/64003] valgrind complains about get_attr_length_nobnd in insn-attrtab.c from i386.md Date: Thu, 20 Nov 2014 19:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg02315.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64003 --- Comment #5 from dmalcolm at gcc dot gnu.org --- Running valgrind with --track-origins=yes shows: ==9952== Uninitialised value was created by a heap allocation ==9952== at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==9952== by 0x12BF3B7: xmalloc (xmalloc.c:147) ==9952== by 0x7876A4: shorten_branches(rtx_insn*) (final.c:1022) ==9952== by 0x787F5F: (anonymous namespace)::pass_shorten_branches::execute(function*) (final.c:4567) ==9952== by 0x994581: execute_one_pass(opt_pass*) (passes.c:2269) ==9952== by 0x994B95: execute_pass_list_1(opt_pass*) (passes.c:2321) ==9952== by 0x994BA7: execute_pass_list_1(opt_pass*) (passes.c:2322) ==9952== by 0x994BA7: execute_pass_list_1(opt_pass*) (passes.c:2322) ==9952== by 0x994BE8: execute_pass_list(function*, opt_pass*) (passes.c:2332) ==9952== by 0x6B87E3: cgraph_node::expand() (cgraphunit.c:1773) ==9952== by 0x6B9DB8: symbol_table::compile() (cgraphunit.c:1909) ==9952== by 0x6BB69C: symbol_table::finalize_compilation_unit() (cgraphunit.c:2325) specifically, it's reading uninitialized data from the insn_lengths array allocated here: insn_lengths = XNEWVEC (int, max_uid);