[PATCH v2] elf: Change TLS static surplus default back to 1664

Florian Weimer fweimer at redhat.com
Mon Jul 20 10:33:53 EDT 2020


* Vineet Gupta via Libc-alpha:

> Hi Florian,
>
> On 7/17/20 4:41 AM, Florian Weimer via Libc-alpha wrote:
>> Make the computation in elf/dl-tls.c more transparent, and add
>> an explicit test for the historic value.
>> 
>> ---
>>  elf/Makefile          |  4 +++-
>>  elf/dl-tls.c          | 37 ++++++++++++++++++++++++++++++-------
>>  elf/tst-tls-surplus.c | 42 ++++++++++++++++++++++++++++++++++++++++++
>>  3 files changed, 75 insertions(+), 8 deletions(-)
>
> On ARC, tst-tls-surplus passes, but it seems there's still some static TLS
> shenanigans.
>
> FAIL: elf/tst-tls-ie
> FAIL: elf/tst-tls-ie-dlmopen
>
> $ cat elf/tst-tls-ie.out
>
> maintls[1000]:	 0x20026f80 .. 0x20027368
> var0[480]:	 0x2093c648 .. 0x2093c828 global-dynamic
> var1[120]:	 0x2093cc40 .. 0x2093ccb8 global-dynamic
> var2[24]:	 0x2093d0d0 .. 0x2093d0e8 global-dynamic
> var3[16]:	 0x2093d500 .. 0x2093d510 global-dynamic
> error: xdlfcn.c:29: error: dlopen:
> glibc-2.31.9000-730-ge9422236a2dd4/build/elf/tst-tls-ie-mod4.so: cannot allocate
> memory in static TLS block
>
> cat elf/tst-tls-ie-dlmopen.out
> maintls[1000]:	 0x20026f80 .. 0x20027368
> var0[480]:	 0x2093c648 .. 0x2093c828 global-dynamic
> var1[120]:	 0x2093d3d8 .. 0x2093d450 global-dynamic
> var2[24]:	 0x2093e000 .. 0x2093e018 global-dynamic
> var3[16]:	 0x2093ebc8 .. 0x2093ebd8 global-dynamic
> error: xdlmopen.c:28: error: dlmopen:
> glibc-2.31.9000-730-ge9422236a2dd4/build/elf/tst-tls-ie-mod6.so: cannot allocate
> memory in static TLS block

I looked at the binaries, but I do not see anything obviously wrong.  I
think you need to single-step through the allocations to see where they
fail, sorry.

Thanks,
Florian




More information about the linux-snps-arc mailing list