Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libc/config/linux/app.h | ||
---|---|---|
83 | Why is this uintptr_t but not size_t? |
libc/config/linux/app.h | ||
---|---|---|
83 | 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. |
libc/config/linux/app.h | ||
---|---|---|
83 | In the implementation below, all the size computations were done with size_t, and then get converted to uintptr_t of TLSDescriptor. Shall we add a static assertion to make sure that it won't silently overflow, i.e. sizeof(size_t) <= sizeof(uintptr_t)? At least they are the same for most of our platforms of interest anyway. |
Address comments.
libc/config/linux/app.h | ||
---|---|---|
83 | Good catch. I fixed it now to use uintptr_t everywhere. |
Nit: If you're adjusting the comment below to talk about a TLS image instead of just a TLS, you should do it here too.