[libc-commits] [libc] Supporting stack protectors in linux x86-64 (PR #66456)

via libc-commits libc-commits at lists.llvm.org
Thu Sep 21 07:18:18 PDT 2023


================
@@ -76,6 +81,16 @@ void init_tls(TLSDescriptor &tls_descriptor) {
   __llvm_libc::inline_memcpy(reinterpret_cast<char *>(tlsAddr),
                              reinterpret_cast<const char *>(app.tls.address),
                              app.tls.init_size);
+  uintptr_t *stackGuardAddr = reinterpret_cast<uintptr_t *>(endPtr + 40);
----------------
lntue wrote:

If this needs to be the default, then can you wrap this under a config option `LIBC_NO_STACK_PROTECTORS` so that the users can disable it if they want to.  Thanks,

https://github.com/llvm/llvm-project/pull/66456


More information about the libc-commits mailing list