This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/81842] -fcf-protection -mcet is incompatible with makecontext family functions
- From: "igor.v.tsimbalist at intel dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Dec 2017 09:39:40 +0000
- Subject: [Bug target/81842] -fcf-protection -mcet is incompatible with makecontext family functions
- Auto-submitted: auto-generated
- References: <bug-81842-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81842
--- Comment #14 from igor.v.tsimbalist at intel dot com ---
The new option is needed to support two cases:
1. Compilation of ucontext functions inside glibc. To have glibc itself be
CET compatible all files comprises the library has to be CET compatible. That
meansthe module with ucontext functions from glibc has to be forced to be CET
compatible.
2. Compilation of a user application with ucontext functions. In this case the
error has to be issued, so no usage of a ucontext functions.
Having just __SHSTK__ macro it's impossible to handle both cases. The case
#1 will report an error during glibc compilation. A new macro is introduced to
use in a source file to handle these cases. To control the value of the new
macro a new option is introduced. Glibc sources will be compiled with
-no-mcheck-shstk-compat.