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

Dirk Mueller dmueller@suse.de
Thu Feb 1 10:30:00 GMT 2007


On Thursday, 1. February 2007 00:34, Dirk Mueller wrote:

> I agree. Which part do you think is missing? the definition of the
> parameter passed down to the builtin_object_size calls in str*  functions
> depending on the fortify level compared to the mem* functions?

As a related note, I am wondering if we should still offer fortify level of 1. 
Richard G's suggestion to split it into -Wfortify (with no runtime overhead) 
and -ffortify (with small runtime overhead, e.g. level 2) makes sense, 
assuming that we will not ever add a higher fortify level anymore. 

Do you know why the level 1 was introduced? Is there any real world code that 
legitimately uses str* related functions and overwrites more than one member?


Dirk



More information about the Gcc-patches mailing list