From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18942 invoked by alias); 2 Oct 2012 19:56:21 -0000 Received: (qmail 18905 invoked by uid 48); 2 Oct 2012 19:56:04 -0000 From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/54783] New: [4.8 Regression] valgrind reports using uninitialised data in mark_pseudo_regno_live and make_object_born on basic code Date: Tue, 02 Oct 2012 19:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zsojka at seznam dot cz X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-10/txt/msg00141.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54783 Bug #: 54783 Summary: [4.8 Regression] valgrind reports using uninitialised data in mark_pseudo_regno_live and make_object_born on basic code Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: zsojka@seznam.cz Created attachment 28331 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28331 reduced testcase Compiler output: $ gcc testcase.c -wrapper valgrind,-q,--track-origins=yes,--num-callers=40 ==11379== Conditional jump or move depends on uninitialised value(s) ==11379== at 0x8A14AD: mark_pseudo_regno_live(int) (sparseset.h:147) ==11379== by 0x8A27AC: process_bb_node_lives(ira_loop_tree_node*) (ira-lives.c:1326) ==11379== by 0x888C1A: ira_traverse_loop_tree(bool, ira_loop_tree_node*, void (*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*)) (ira-build.c:1495) ==11379== by 0x8A3AB1: ira_create_allocno_live_ranges() (ira-lives.c:1591) ==11379== by 0x88B52C: ira_build() (ira-build.c:3093) ==11379== by 0x883936: rest_of_handle_ira() (ira.c:4223) ==11379== by 0x8FF80C: execute_one_pass(opt_pass*) (passes.c:2191) ==11379== by 0x8FFBC4: execute_pass_list(opt_pass*) (passes.c:2246) ==11379== by 0x8FFBD6: execute_pass_list(opt_pass*) (passes.c:2247) ==11379== by 0x6C26A7: expand_function(cgraph_node*) (cgraphunit.c:1601) ==11379== by 0x6C4811: compile() (cgraphunit.c:1794) ==11379== by 0x6C4B34: finalize_compilation_unit() (cgraphunit.c:2080) ==11379== by 0x5A171F: c_write_global_declarations() (c-decl.c:10116) ==11379== by 0x9E6234: compile_file() (toplev.c:560) ==11379== by 0x9E7E09: toplev_main(int, char**) (toplev.c:1863) ==11379== by 0x5A334BC: (below main) (in /lib64/libc-2.15.so) ==11379== Uninitialised value was created by a heap allocation ==11379== at 0x4C29A80: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==11379== by 0x1168107: xmalloc (xmalloc.c:147) ==11379== by 0x9CC85F: sparseset_alloc(unsigned long) (sparseset.c:33) ==11379== by 0x8A3A3F: ira_create_allocno_live_ranges() (ira-lives.c:1583) ==11379== by 0x88B52C: ira_build() (ira-build.c:3093) ==11379== by 0x883936: rest_of_handle_ira() (ira.c:4223) ==11379== by 0x8FF80C: execute_one_pass(opt_pass*) (passes.c:2191) ==11379== by 0x8FFBC4: execute_pass_list(opt_pass*) (passes.c:2246) ==11379== by 0x8FFBD6: execute_pass_list(opt_pass*) (passes.c:2247) ==11379== by 0x6C26A7: expand_function(cgraph_node*) (cgraphunit.c:1601) ==11379== by 0x6C4811: compile() (cgraphunit.c:1794) ==11379== by 0x6C4B34: finalize_compilation_unit() (cgraphunit.c:2080) ==11379== by 0x5A171F: c_write_global_declarations() (c-decl.c:10116) ==11379== by 0x9E6234: compile_file() (toplev.c:560) ==11379== by 0x9E7E09: toplev_main(int, char**) (toplev.c:1863) ==11379== by 0x5A334BC: (below main) (in /lib64/libc-2.15.so) ==11379== ==11379== Conditional jump or move depends on uninitialised value(s) ==11379== at 0x8A138A: make_object_born(ira_object*) (sparseset.h:147) ==11379== by 0x8A14CA: mark_pseudo_regno_live(int) (ira-lives.c:295) ==11379== by 0x8A27AC: process_bb_node_lives(ira_loop_tree_node*) (ira-lives.c:1326) ==11379== by 0x888C1A: ira_traverse_loop_tree(bool, ira_loop_tree_node*, void (*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*)) (ira-build.c:1495) ==11379== by 0x8A3AB1: ira_create_allocno_live_ranges() (ira-lives.c:1591) ==11379== by 0x88B52C: ira_build() (ira-build.c:3093) ==11379== by 0x883936: rest_of_handle_ira() (ira.c:4223) ==11379== by 0x8FF80C: execute_one_pass(opt_pass*) (passes.c:2191) ==11379== by 0x8FFBC4: execute_pass_list(opt_pass*) (passes.c:2246) ==11379== by 0x8FFBD6: execute_pass_list(opt_pass*) (passes.c:2247) ==11379== by 0x6C26A7: expand_function(cgraph_node*) (cgraphunit.c:1601) ==11379== by 0x6C4811: compile() (cgraphunit.c:1794) ==11379== by 0x6C4B34: finalize_compilation_unit() (cgraphunit.c:2080) ==11379== by 0x5A171F: c_write_global_declarations() (c-decl.c:10116) ==11379== by 0x9E6234: compile_file() (toplev.c:560) ==11379== by 0x9E7E09: toplev_main(int, char**) (toplev.c:1863) ==11379== by 0x5A334BC: (below main) (in /lib64/libc-2.15.so) ==11379== Uninitialised value was created by a heap allocation ==11379== at 0x4C29A80: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==11379== by 0x1168107: xmalloc (xmalloc.c:147) ==11379== by 0x9CC85F: sparseset_alloc(unsigned long) (sparseset.c:33) ==11379== by 0x8A3A3F: ira_create_allocno_live_ranges() (ira-lives.c:1583) ==11379== by 0x88B52C: ira_build() (ira-build.c:3093) ==11379== by 0x883936: rest_of_handle_ira() (ira.c:4223) ==11379== by 0x8FF80C: execute_one_pass(opt_pass*) (passes.c:2191) ==11379== by 0x8FFBC4: execute_pass_list(opt_pass*) (passes.c:2246) ==11379== by 0x8FFBD6: execute_pass_list(opt_pass*) (passes.c:2247) ==11379== by 0x6C26A7: expand_function(cgraph_node*) (cgraphunit.c:1601) ==11379== by 0x6C4811: compile() (cgraphunit.c:1794) ==11379== by 0x6C4B34: finalize_compilation_unit() (cgraphunit.c:2080) ==11379== by 0x5A171F: c_write_global_declarations() (c-decl.c:10116) ==11379== by 0x9E6234: compile_file() (toplev.c:560) ==11379== by 0x9E7E09: toplev_main(int, char**) (toplev.c:1863) ==11379== by 0x5A334BC: (below main) (in /lib64/libc-2.15.so) ==11379== Tested revisions: r191953 - fail r191586 - fail 4.7 r191640 - OK