From: Yingchun Li <sword.l.dragon@gmail.com>
To: newlib@sourceware.org
Subject: Why the cplusplus doesn't support -D_FORTIFY_SOURCE
Date: Mon, 24 Aug 2020 15:14:40 +0800 [thread overview]
Message-ID: <CADkvYHG7_nbdR23Smm8JrBtCT2a=sMhhZ0FPN60y3Y-OMyMOgg@mail.gmail.com> (raw)
Sorry, My previous post
https://sourceware.org/pipermail/newlib/2020/017909.html
shows the wrong format, sorry for that.
Now post it again.
In the sys/features.h, the "__SSP_FORTIFY_LEVEL" will not be defined when
the source file is cplusplus.
#if _FORTIFY_SOURCE > 0 && !defined(__cplusplus) && !defined(__lint__)
&& \ (__OPTIMIZE__ > 0 || defined(__clang__)) && __GNUC_PREREQ__(4,
1)
# if _FORTIFY_SOURCE > 1
# define __SSP_FORTIFY_LEVEL 2# else# define __SSP_FORTIFY_LEVEL 1
# endif
#else
# define __SSP_FORTIFY_LEVEL 0
#endif
So, if defined cplusplus, the __SPP_FORTIFY_LEVEL is always 0.My question is why
disable this feature, if enable this feature forcely, is there any
possible issue?
Br,Yingchun
next reply other threads:[~2020-08-24 7:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 7:14 Yingchun Li [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-08-24 6:53 sword_iii
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='CADkvYHG7_nbdR23Smm8JrBtCT2a=sMhhZ0FPN60y3Y-OMyMOgg@mail.gmail.com' \
--to=sword.l.dragon@gmail.com \
--cc=newlib@sourceware.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: link
Be 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).