This is the mail archive of the gcc-bugs@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]

[Bug middle-end/58245] -fstack-protector[-all] does not protect functions that call noreturn functions


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58245

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I don't see how this can be considered a GCC bug.
GCC doesn't check the canary before any other functions in the body of the
function, the reason for checking the stack canary is to prevent using
overwritten return addresses on the stack, but noreturn function doesn't
return, so it is irrelevant if the stack has been overwritten (except for what
would matter inside of the function itself, but we don't check it for any other
function either in the middle of functions).


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