[libc-commits] [PATCH] D129543: [libc] Linux threads - Setup TLS area of a new thread and cleanup at exit.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Jul 12 23:25:49 PDT 2022


sivachandra added inline comments.


================
Comment at: libc/config/linux/app.h:83
+  // The size of the TLS area.
+  uintptr_t size = 0;
+
----------------
lntue wrote:
> Why is this `uintptr_t` but not `size_t`?
This size value actually comes from the ELF TLS image description. In ELF64 it is a 64-bit value, and in ELF32 it is a 32-bit value. So, capturing it as a `uintptr_t` value will capture it without any potential mix ups.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129543/new/

https://reviews.llvm.org/D129543



More information about the libc-commits mailing list