================
Comment at: lib/safestack/safestack.cc:42
@@ +41,3 @@
+// all symbols from pthread that we use dynamically
+#define __DECLARE_WRAPPER(fn) __typeof__(fn)* __d_ ## fn = NULL;
+
----------------
kcc wrote:
> Why not simply force -lpthread in the driver? 
The overhead of adding -pthread (-lpthread is non-portable) to single-threaded 
programs is measurably greater than the overhead of safe stack.  We (current 
hat: FreeBSD) are willing to ship packages with SSP by default and would be 
very willing to ship packages with safe-stack, but if it forced -pthread then 
the overhead would be more than we'd be willing to accept.

================
Comment at: lib/safestack/safestack.cc:51
@@ +50,3 @@
+
+// The unsafe stack pointer is stored in the TCB structure on these platforms
+#if defined(__i386__)
----------------
kcc wrote:
>  I might be missing something, but can't we just use TLS to store the second 
> stack? 
C11 TLS does not have a way of attaching destructors.  C++11 does (although the 
standard is undefined in the presence of shared library loading and unloading, 
which makes it less useful), but does not have any way of ordering the 
destruction.

http://reviews.llvm.org/D6096



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to