Description
Since go 1.20, the Go runtime allocates the TLS slot in the TEB TlsSlots instead of using the TEB arbitrary pointer. See CL 431775 for more context.
The problem is that the static TEB TlsSlots array only has capacity for 64 indices, when more slots are required TlsAlloc allocates them on a heap-allocated array. TlsGetValue abstracts this implementation detail, but we don't use TlsGetValue
and our logic to retrieve the TLS value does not currently support retrieving the value from TlsSlots or the heap depending on the index.
For now I've submitted CL 486816 to fallback to the old behavior (TEB arbitrary pointer) in case the TLS index is higher than 64. This solution is temporal, as we should rely on the TEB arbitrary pointer.
This issue should track the effort (small or big, still don't know) to implement a solution that supported TLS indices higher than 64.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status