[v2,3/4] Fix elf/tst-dlmopen-twice not to exhaust static TLS

Message ID 8dcd34ccf6d5d07153baf9bc559a102ea5877ff1.1666974807.git.szabolcs.nagy@arm.com
State Committed
Commit 2eeeee7636cb52a09740598404808def17cf750e
Headers
Series patches from the morello port |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Szabolcs Nagy Oct. 28, 2022, 4:40 p.m. UTC
  By default glibc only allocates enough static TLS for 4 link namespaces
including the initial one. So only use 3 dlmopens in the test.

---
v2: lowered the dlmopen count from 10 to 3.
---
 elf/tst-dlmopen-twice.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Florian Weimer Oct. 28, 2022, 5:04 p.m. UTC | #1
* Szabolcs Nagy via Libc-alpha:

> By default glibc only allocates enough static TLS for 4 link namespaces
> including the initial one. So only use 3 dlmopens in the test.
>
> ---
> v2: lowered the dlmopen count from 10 to 3.
> ---
>  elf/tst-dlmopen-twice.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/elf/tst-dlmopen-twice.c b/elf/tst-dlmopen-twice.c
> index 70c71fe19c..a8d7e5e081 100644
> --- a/elf/tst-dlmopen-twice.c
> +++ b/elf/tst-dlmopen-twice.c
> @@ -46,8 +46,8 @@ do_test (void)
>    recurse (1);
>  
>    /* Then with nesting.  The constant needs to be less than the
> -     internal DL_NNS namespace constant.  */
> -  recurse (10);
> +     glibc.rtld.nns tunable (which is 4 by default).  */
> +  recurse (3);
>    return 0;
>  }

Okay.

Reviewed-by: Florian Weimer <fweimer@redhat.com>

Thanks,
Florian
  

Patch

diff --git a/elf/tst-dlmopen-twice.c b/elf/tst-dlmopen-twice.c
index 70c71fe19c..a8d7e5e081 100644
--- a/elf/tst-dlmopen-twice.c
+++ b/elf/tst-dlmopen-twice.c
@@ -46,8 +46,8 @@  do_test (void)
   recurse (1);
 
   /* Then with nesting.  The constant needs to be less than the
-     internal DL_NNS namespace constant.  */
-  recurse (10);
+     glibc.rtld.nns tunable (which is 4 by default).  */
+  recurse (3);
   return 0;
 }