public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/54582] gap in FORTIFY checking of buffer lengths Date: Wed, 06 Feb 2013 13:26:00 -0000 [thread overview] Message-ID: <bug-54582-4-RvgEQ86Bx8@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-54582-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54582 --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-06 13:25:29 UTC --- Because object sizes are finalized only during the objsz pass, after lots of optimization passes. Note, as I said earlier, what matters most is that the check is performed at runtime in that case and thus the source code bug can't be exploited. The warning is just to let the user know earlier than at runtime, when easily possible. -D_FORTIFY_SOURCE{,=2} is done using inline functions, so the FE pretty much never knows the object size, you need inlining and various propagations (plus for many cases also the objsz pass that propagates the object size properties through the IL). In the FE you could do it only if all the fortification functions were preprocessor macros, and handle only the most simple cases.
next prev parent reply other threads:[~2013-02-06 13:26 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-09-14 19:48 [Bug c/54582] New: " dcb314 at hotmail dot com 2012-09-17 8:51 ` [Bug c/54582] " rguenth at gcc dot gnu.org 2013-02-06 10:58 ` dcb314 at hotmail dot com 2013-02-06 12:18 ` [Bug middle-end/54582] " rguenth at gcc dot gnu.org 2013-02-06 12:21 ` rguenth at gcc dot gnu.org 2013-02-06 12:41 ` jakub at gcc dot gnu.org 2013-02-06 13:14 ` manu at gcc dot gnu.org 2013-02-06 13:26 ` jakub at gcc dot gnu.org [this message] 2013-02-06 13:40 ` manu at gcc dot gnu.org 2013-02-06 13:47 ` jakub at gcc dot gnu.org 2013-02-06 14:29 ` fweimer at redhat dot com 2013-02-06 18:48 ` dcb314 at hotmail dot com 2013-02-07 21:19 ` dcb314 at hotmail dot com 2013-02-07 21:22 ` dcb314 at hotmail dot com 2013-02-14 19:07 ` dcb314 at hotmail dot com 2013-03-08 8:49 ` dcb314 at hotmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-54582-4-RvgEQ86Bx8@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).