public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/42884] GCC (v4.3.3) fails to detect uninitialized variable
Date: Wed, 27 Jan 2010 16:51:00 -0000	[thread overview]
Message-ID: <20100127165108.21490.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42884-18720@http.gcc.gnu.org/bugzilla/>



------- Comment #16 from rguenth at gcc dot gnu dot org  2010-01-27 16:51 -------
(In reply to comment #15)
> (In reply to comment #14)
> > As diglen has its address taken and we do not warn about uninitialized use
> > of memory we do not warn.
> > 
> 
> I get that the compiler can't track if an external function actually
> initializes a value through a pointer, but the "diglen = sizeof..." line should
> be good enough for the positive case.  In the false path though "diglen" is not
> initialized nor its address taken.

No, it's an implementation detail.  Uninitialized variable use tracking
works with detecting uses of SSA name default definitions.  Memory 
is not in SSA form so this mechanism does not work.

Uninitialized memory detection is not done at all.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42884


  parent reply	other threads:[~2010-01-27 16:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27 13:58 [Bug c/42884] New: " tstdenis at elliptictech dot com
2010-01-27 14:01 ` [Bug c/42884] " paolo dot carlini at oracle dot com
2010-01-27 14:01 ` paolo dot carlini at oracle dot com
2010-01-27 14:01 ` tstdenis at elliptictech dot com
2010-01-27 14:03 ` tstdenis at elliptictech dot com
2010-01-27 14:07 ` paolo dot carlini at oracle dot com
2010-01-27 14:07 ` paolo dot carlini at oracle dot com
2010-01-27 14:09 ` tstdenis at elliptictech dot com
2010-01-27 14:13 ` paolo dot carlini at oracle dot com
2010-01-27 14:28 ` tstdenis at elliptictech dot com
2010-01-27 14:37 ` paolo dot carlini at oracle dot com
2010-01-27 15:43 ` tstdenis at elliptictech dot com
2010-01-27 15:47 ` paolo dot carlini at oracle dot com
2010-01-27 15:58 ` tstdenis at elliptictech dot com
2010-01-27 15:59 ` paolo dot carlini at oracle dot com
2010-01-27 16:05 ` tstdenis at elliptictech dot com
2010-01-27 16:06 ` rguenth at gcc dot gnu dot org
2010-01-27 16:22 ` tstdenis at elliptictech dot com
2010-01-27 16:23 ` paolo dot carlini at oracle dot com
2010-01-27 16:51 ` rguenth at gcc dot gnu dot org [this message]
2010-01-27 17:55 ` tstdenis at elliptictech dot com
2010-01-27 19:51 ` rguenth at gcc dot gnu dot org
2010-09-02 16:01 ` tadhunt at gmail dot com
2010-09-02 23:11 ` manu at gcc dot gnu dot org
2010-09-03 13:08 ` thutt at vmware dot com
2010-09-03 14:07 ` manu at gcc dot gnu dot org

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=20100127165108.21490.qmail@sourceware.org \
    --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).