[PATCH] Protection against stack-based memory corruption errors using SafeStack: Clang command line option and function attribute

JF Bastien jfb at chromium.org
Wed May 27 18:00:17 PDT 2015


You should also update the patch description.

Besides my new comment on warnings (which could be added separately), this patch LGTM.


================
Comment at: docs/SafeStack.rst:109
@@ +108,3 @@
+This builtin function returns a pointer to the start of the unsafe stack of the
+current thread.
+
----------------
pcc wrote:
> jfb wrote:
> > What happens when calling ``__builtin_frame_address`` with SafeStack?
> I believe it will return a pointer to the safe stack. I've added some stuff to the Limitations section about this.
Would it be possible to have clang warn when doing safe-stack and `__builtin_frame_address` is used, or the stack leaks in other inadvertent ways? We want to avoid noisy warnings, but converting an existing codebase should probably require explicitly adding no-safe-stack attributes where required.

http://reviews.llvm.org/D6095

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list