public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dcb314 at hotmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/94187] New: valgrind error in count_nonzero_bytes ?
Date: Mon, 16 Mar 2020 08:10:07 +0000	[thread overview]
Message-ID: <bug-94187-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94187

            Bug ID: 94187
           Summary: valgrind error in count_nonzero_bytes ?
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C code:

int
foo (void)
{
  return *(int *) "";
}

I ran the code through a valgrind version of recent gcc trunk, 
with the compiler flag -O2, and got this:

./gcc.dg/pr68785.c
==49861== Invalid read of size 1
==49861==    at 0xD9CDDD: count_nonzero_bytes(tree_node*, unsigned long,
unsigned long, unsigned int*, bool*, bool*, bool*, vr_values const*,
ssa_name_limit_t&) (tree-ssa-strlen.c:4891)
==49861==    by 0xD9CF17: count_nonzero_bytes(tree_node*, unsigned long,
unsigned long, unsigned int*, bool*, bool*, bool*, vr_values const*,
ssa_name_limit_t&) (tree-ssa-strlen.c:4801)
==49861==    by 0xDA19EE: count_nonzero_bytes (tree-ssa-strlen.c:4920)
==49861==    by 0xDA19EE: handle_integral_assign(gimple_stmt_iterator*, bool*,
vr_values const*) (tree-ssa-strlen.c:5547)

This bug is strongly related to bug # 68785.

             reply	other threads:[~2020-03-16  8:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16  8:10 dcb314 at hotmail dot com [this message]
2020-03-16 10:51 ` [Bug tree-optimization/94187] " marxin at gcc dot gnu.org
2020-03-16 11:18 ` dcb314 at hotmail dot com
2020-03-16 11:20 ` jakub at gcc dot gnu.org
2020-03-16 11:28 ` jakub at gcc dot gnu.org
2020-03-16 11:35 ` [Bug tree-optimization/94187] [10 Regression] valgrind error in count_nonzero_bytes since r10-2101 jakub at gcc dot gnu.org
2020-03-16 11:40 ` jakub at gcc dot gnu.org
2020-03-16 12:07 ` dcb314 at hotmail dot com
2020-03-16 21:04 ` dcb314 at hotmail dot com
2020-03-17  8:38 ` marxin at gcc dot gnu.org
2020-03-17  8:52 ` dcb314 at hotmail dot com
2020-03-17  9:44 ` cvs-commit at gcc dot gnu.org
2020-03-17  9:54 ` jakub at gcc dot gnu.org
2020-03-25 16:08 ` dcb314 at hotmail 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-94187-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).