[PATCH] D15192: [safestack] Turn the OS X SafeStack runtime into a dynamic library

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 3 10:52:19 PST 2015


kubabrecka added inline comments.

================
Comment at: tools/clang/lib/Driver/Tools.cpp:6963
@@ -6962,3 @@
-  // These libraries should be linked first, to make sure the
-  // __safestack_init constructor executes before everything else
-  if (getToolChain().getSanitizerArgs().needsSafeStackRt()) {
----------------
samsonov wrote:
> How do you address this now?
We link against the SafeStack dylib (we depend on it), so its constructors will be run before any constructors of the instrumented module.  This is only an issue with a static library, where the __safestack_init  constructor is in the same module as instrumented code.


http://reviews.llvm.org/D15192





More information about the llvm-commits mailing list