Hi list,

2013/05/12 Sun 0:36:43 UTC+9 tyru wrote:
> 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:
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/include/ruby/defines.h?r1=40572&r2=40571&pathrev=40572
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.

Thanks,
Ken Takata

-- 
-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui