This patch adds the -fsafe-stack command line argument for clang, which enables the Safe Stack protection (see http://reviews.llvm.org/D6094 for the detailed description of the Safe Stack).
This patch is our implementation of the safe stack on top of the current SVN HEAD of Clang (r221154). The patches make the following changes:
- Add -fsafe-stack and -fno-safe-stack options to clang to control safe stack usage (the safe stack is disabled by default).
- Add attribute((no_safe_stack)) attribute to clang that can be used to disable the safe stack for individual functions even when enabled globally.
.. based on stack-based...
I'd remove the second "based"