linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Josh Triplett <josh@joshtriplett.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
	smatch@vger.kernel.org, linux-sparse@vger.kernel.org
Subject: Re: buffer overflow check bug
Date: Mon, 18 Jun 2012 23:25:01 +0300	[thread overview]
Message-ID: <20120618202501.GN4400@mwanda> (raw)
In-Reply-To: <20120618200407.GA3231@leaf>

On Mon, Jun 18, 2012 at 01:04:07PM -0700, Josh Triplett wrote:
> On Mon, Jun 18, 2012 at 10:53:44PM +0300, Dan Carpenter wrote:
> > Gar...  I have no idea.  That seems like an issue in sparse.
> > 
> > Does anyone know why MOD_NORETURN gets set for:
> > extern void my_exit(const char*, ...) __attribute__ ((__noreturn__));
> > 
> > but not for:
> > extern __attribute__ ((__noreturn__)) void my_exit(const char*, ...);
> > 
> > GCC seems to accept both formats.
> 
> I wonder if the latter gets incorrectly parsed as though the attribute
> attached to "void" rather than "my_exit"?
> 

I put a:
	printf("%d %d token = %s\n", token->pos.line, token->pos.pos, token->ident->name);
in handle_attributes() and it only prints when the attribute is at
the end.

regards,
dan carpenter


  reply	other threads:[~2012-06-18 20:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4FDBA56F.8070106@gmail.com>
     [not found] ` <4FDEFCB1.7030800@gmail.com>
     [not found]   ` <4FDF0AA5.6080905@gmail.com>
     [not found]     ` <20120618113037.GI4400@mwanda>
     [not found]       ` <4FDF1610.3000100@gmail.com>
     [not found]         ` <20120618121726.GG13539@mwanda>
     [not found]           ` <4FDF2036.4080908@gmail.com>
     [not found]             ` <20120618134338.GJ4400@mwanda>
     [not found]               ` <20120618181111.GH13539@mwanda>
     [not found]                 ` <CAHGf_=rNSUKPrV5yYyJ8KWbvHO4zAPU7Du4_9HbwW-HiLVbFiw@mail.gmail.com>
2012-06-18 19:53                   ` buffer overflow check bug Dan Carpenter
2012-06-18 20:04                     ` Josh Triplett
2012-06-18 20:25                       ` Dan Carpenter [this message]
2012-06-19 20:37                     ` Xi Wang
2012-06-22 12:31                       ` Dan Carpenter

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=20120618202501.GN4400@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=josh@joshtriplett.org \
    --cc=kosaki.motohiro@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=smatch@vger.kernel.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 NNTP newsgroup(s).