Re: should add __attribute__((alloc_size)) to functions using malloc() ?
- Ken Takata wrote:
> 2013/05/12 Sun 0:36:43 UTC+9 tyru wrote:Please don't waste time on it. For Vim _FORTIFY_SOURCE doesn't really
> > Hi list.
> > I have read a blog post about gcc extension.
> > http://mkosaki.blog46.fc2.com/blog-entry-1228.html (Japanese)
> > The blog title says "_FORTIFY_SOURCE without
> > __attribute__((alloc_size)) doesn't make sense" .
> > I've seen some "_FORTIFY_SOURCE" outputs while compiling Vim.
> > Should we add __attribute__((alloc_size)) to functions using malloc(),
> > and calloc() ?
> > (original post doesn't say about calloc(), though)
> > I also found alloc(), lalloc() in misc2.c which should be related for this.
> > I don't understand Vim build system well yet.
> > I hope someone would create a patch for this...
> > Thanks
> Here is a good example which uses __attribute__((alloc_size)).
> See the following commit to the Ruby's source code:
> This commit was written by the author of the blog post.
> However we can't apply this method directly to the Vim's source code,
> because we use cproto to generate *.pro.
work. There are many structures that are allocated larger than they are
defined. It will just be a lot of work to create false alarms.
MORTICIAN: Who's that then?
CUSTOMER: I don't know.
MORTICIAN: Must be a king.
MORTICIAN: He hasn't got shit all over him.
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
For more options, visit https://groups.google.com/groups/opt_out.