This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/58245] -fstack-protector[-all] does not protect functions that call noreturn functions
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 01 Oct 2013 15:44:10 +0000
- Subject: [Bug middle-end/58245] -fstack-protector[-all] does not protect functions that call noreturn functions
- Auto-submitted: auto-generated
- References: <bug-58245-4 at http dot gcc dot gnu dot org/bugzilla/>
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).