public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/64003] New: valgrind complains about get_attr_length_nobnd in insn-attrtab.c from i386.md
Date: Thu, 20 Nov 2014 18:39:00 -0000 [thread overview]
Message-ID: <bug-64003-4@http.gcc.gnu.org/bugzilla/> (raw)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64003
Bug ID: 64003
Summary: valgrind complains about get_attr_length_nobnd in
insn-attrtab.c from i386.md
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: dmalcolm at gcc dot gnu.org
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Created attachment 34057
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34057&action=edit
Reproducer
When I run the jit testsuite under valgrind I consistently see reports from
here:
Conditional jump or move depends on uninitialised value(s)
at 0x5721AED: get_attr_length_nobnd(rtx_insn*) (i386.md:6236)
by 0x5715F3A: insn_min_length(rtx_insn*) (i386.md:510)
by 0x4F4BE0A: shorten_branches(rtx_insn*) (final.c:1208)
by 0x4F52A5A: rest_of_handle_shorten_branches() (final.c:4567)
by 0x4F52AAE: (anonymous
namespace)::pass_shorten_branches::execute(function*) (final.c:4596)
by 0x522354D: execute_one_pass(opt_pass*) (passes.c:2306)
by 0x52237C4: execute_pass_list_1(opt_pass*) (passes.c:2358)
by 0x52237F5: execute_pass_list_1(opt_pass*) (passes.c:2359)
by 0x52237F5: execute_pass_list_1(opt_pass*) (passes.c:2359)
by 0x5223832: execute_pass_list(function*, opt_pass*) (passes.c:2369)
by 0x4E4884F: cgraph_node::expand() (cgraphunit.c:1773)
by 0x4E48EE9: expand_all_functions() (cgraphunit.c:1909)
I can reproduce this with cc1 with the attached file at -O2 and above:
valgrind ./cc1 get-attr-length-i386.c -O2
This is with r217427 on x86_64-unknown-linux-gnu, configuring with:
--enable-valgrind-annotations
Turning off the writing of #line directives in read-md.c shows that it's at
line 18500 of the generated insn-attrtab.c:
==5819== at 0xD952E2: get_attr_length_nobnd(rtx_insn*)
(insn-attrtab.c:18500)
somewhere within this monster conditional:
18493 int
18494 get_attr_length_nobnd (rtx_insn *insn ATTRIBUTE_UNUSED)
18495 {
18496 switch (recog_memoized (insn))
18497 {
18498 case 610: /* *jcc_1 */
18499 extract_insn_cached (insn);
>18500 if ((((INSN_ADDRESSES_SET_P () ? INSN_ADDRESSES (INSN_UID (GET_CODE (operands[0]) == LABEL_REF ? XEXP (operands[0], 0) : operands[0])) : 0) - (insn_current_reference_address (insn))) >= (-126)) && (((INSN_ADDRESSES_SET_P () ? INSN_ADDRESSES (INSN_UID (GET_CODE (operands[0]) == LABEL_REF ? XEXP (operands[0], 0) : operands[0])) : 0) - (insn_current_reference_address (insn))) < (128)))
next reply other threads:[~2014-11-20 18:39 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-20 18:39 dmalcolm at gcc dot gnu.org [this message]
2014-11-20 18:41 ` [Bug rtl-optimization/64003] " dmalcolm at gcc dot gnu.org
2014-11-20 18:54 ` dmalcolm at gcc dot gnu.org
2014-11-20 19:23 ` dmalcolm at gcc dot gnu.org
2014-11-20 19:27 ` dmalcolm at gcc dot gnu.org
2014-11-20 19:41 ` dmalcolm at gcc dot gnu.org
2014-11-21 19:04 ` [Bug target/64003] " dmalcolm at gcc dot gnu.org
2014-12-02 2:20 ` dmalcolm at gcc dot gnu.org
2014-12-02 15:40 ` dmalcolm at gcc dot gnu.org
2014-12-02 15:48 ` dmalcolm at gcc dot gnu.org
2014-12-02 15:54 ` dmalcolm at gcc dot gnu.org
2014-12-02 16:08 ` dmalcolm at gcc dot gnu.org
2014-12-02 16:13 ` dmalcolm at gcc dot gnu.org
2014-12-04 9:24 ` amylaar at gcc dot gnu.org
2014-12-04 18:43 ` law at redhat dot com
2014-12-04 18:44 ` law at redhat dot com
2014-12-04 19:19 ` amylaar at gcc dot gnu.org
2014-12-04 19:38 ` enkovich.gnu at gmail dot com
2014-12-04 19:45 ` amylaar at gcc dot gnu.org
2014-12-04 19:51 ` law at redhat dot com
2014-12-04 19:54 ` law at redhat dot com
2014-12-05 10:07 ` enkovich.gnu at gmail dot com
2014-12-05 10:08 ` enkovich.gnu at gmail dot com
2014-12-05 10:38 ` ubizjak at gmail dot com
2014-12-05 10:50 ` ubizjak at gmail dot com
2014-12-05 14:19 ` rsandifo at gcc dot gnu.org
2014-12-05 15:01 ` enkovich.gnu at gmail dot com
2014-12-05 16:01 ` ienkovich at gcc dot gnu.org
2015-04-16 14:08 ` ienkovich at gcc dot gnu.org
2015-07-24 8:32 ` ubizjak at gmail dot com
2015-07-24 8:36 ` ubizjak at gmail dot com
2015-07-24 16:26 ` uros at gcc dot gnu.org
2015-07-24 16:31 ` ubizjak at gmail dot com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-64003-4@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).