public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xinliang David Li <davidxl@google.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Wei Mi <wmi@google.com>, Diego Novillo <dnovillo@google.com>,
		Dodji Seketeli <dseketel@redhat.com>,
	gcc-patches@gcc.gnu.org
Subject: Re: [asan] Emit GIMPLE directly, small cleanups
Date: Tue, 16 Oct 2012 16:27:00 -0000	[thread overview]
Message-ID: <CAAkRFZKz7VzFRTbxp86EG12qXRqnKnUYmbJC_RidswuH2ksFiw@mail.gmail.com> (raw)
In-Reply-To: <20121016061208.GD584@tucnak.redhat.com>

On Mon, Oct 15, 2012 at 11:12 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, Oct 15, 2012 at 10:48:13PM -0700, Xinliang David Li wrote:
>> Another error checking feature is to poison stack vars on entry and
>> exit of the lexical scope to catch uninit variable reference and out
>> of scope references:
>>
>> S* sp;
>>   {
>>     S s;
>>     sp = &s;
>>   }
>>   .. *sp ...
>>
>> This is relatively easy to do in gcc thanks to the clobber statement.
>> In Clang/LLVM, it is in the wishlist:
>> http://code.google.com/p/address-sanitizer/issues/detail?id=83
>
> That is not easy at all unfortunately, CLOBBER isn't sufficient for that.
> You have the points where the variable looses value, but there aren't
> similar markup statement where it gets into scope again.
> See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54770#c3

I don't get it.  Clobber marks the end of lifetime of a variable so it
is safe to emit code to really clobber its value -- otherwise how
would clobber based slot sharing work?

David

>
>         Jakub

  reply	other threads:[~2012-10-16 16:06 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-11 16:44 Jakub Jelinek
2012-10-11 17:27 ` Diego Novillo
2012-10-11 17:32   ` Jakub Jelinek
2012-10-11 23:33     ` Wei Mi
2012-10-12  7:57       ` Jakub Jelinek
2012-10-12 16:33         ` Xinliang David Li
2012-10-12 16:33           ` Jakub Jelinek
2012-10-12 16:36             ` Xinliang David Li
2012-10-16  6:28           ` Xinliang David Li
2012-10-16 15:26             ` Jakub Jelinek
2012-10-16 16:27               ` Xinliang David Li [this message]
2012-10-16 16:29                 ` Jakub Jelinek
2012-10-16 16:57                   ` Xinliang David Li
2012-10-16 18:03                     ` Jakub Jelinek
2012-10-16 18:05                       ` Xinliang David Li
2012-10-12 13:57       ` Diego Novillo
2012-10-12 15:04         ` Rainer Orth
2012-10-12 16:13           ` Diego Novillo
2012-10-12 16:46             ` Jakub Jelinek
2012-10-12 17:09               ` Diego Novillo
2012-10-12 19:14               ` Ian Lance Taylor
2012-10-15 14:44                 ` Rainer Orth
2012-10-15 16:14                   ` Ian Lance Taylor
2012-10-15 16:33                     ` Diego Novillo
2012-10-16 11:28                       ` Rainer Orth
2012-10-16 11:39                         ` Diego Novillo
2012-10-16 13:31                         ` Ian Lance Taylor
2012-10-16 21:52                           ` Eric Botcazou
2012-10-16 22:51                             ` Ian Lance Taylor
2012-10-16 22:56                               ` Diego Novillo
2012-10-17 21:31                                 ` Eric Botcazou
     [not found]       ` <CAAkRFZLUe2Dsno28WSajyEZCCQu9Qghi8rDZecjFLE9oioBe+A@mail.gmail.com>
     [not found]         ` <20121012072644.GJ584@tucnak.redhat.com>
2012-10-12 16:40           ` Xinliang David Li
2012-10-12 10:32     ` Richard Biener
2012-10-11 17:55   ` Wei Mi
2012-10-11 17:46 ` Xinliang David Li
2012-10-11 18:17   ` Jakub Jelinek
2012-10-11 19:37     ` Xinliang David Li

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=CAAkRFZKz7VzFRTbxp86EG12qXRqnKnUYmbJC_RidswuH2ksFiw@mail.gmail.com \
    --to=davidxl@google.com \
    --cc=dnovillo@google.com \
    --cc=dseketel@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=wmi@google.com \
    /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).