This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] [PATCH] Implement -ffortify for C/C++


On Wednesday, 21. February 2007 17:59, Ulrich Drepper wrote:

> This is the wrong approach for a simple set of reasons:

It is the first out of a set of patches. 

> - gcc will not be able to handle all functions which need to be
>   protected:

Thats correct. thats why I have a __attribute__((fortify)) patch in testing 
which will allow glibc headers to annotate POSIX and other non-standard 
functions. 

> - but once you have such support in the compiler there is no reason to
>   add any bloat to gcc by making the built-ins more complicated,

They're not more complicated. 

>   and with at least 
>   the same functionality in the system library headers

Unless I missed something, gcc still has to understand what an operator new 
is, which is necessary for object sizes being properly propagated. This is an 
essential part of the patch series. 

> I.e., adding this new option does not solve the problem and the real
> solution makes this patch unnecessary.

The real solution will not rewrite string related functions into their _chk 
variants. 

Greetings,
Dirk



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]