elf: Do not duplicate the GLIBC_TUNABLES string
[platform/upstream/glibc.git] / elf / tst-execstack.c
index 114f341..560b353 100644 (file)
@@ -137,7 +137,12 @@ do_test (void)
 #endif
 
   /* Loading this module should force stacks to become executable.  */
-  void *h = dlopen ("tst-execstack-mod.so", RTLD_LAZY);
+#if USE_PTHREADS
+  const char *soname = "tst-execstack-threads-mod.so";
+#else
+  const char *soname = "tst-execstack-mod.so";
+#endif
+  void *h = dlopen (soname, RTLD_LAZY);
   if (h == NULL)
     {
       printf ("cannot load: %s\n", dlerror ());
@@ -227,7 +232,7 @@ static void
 deeper (void (*f) (void))
 {
   char stack[1100 * 1024];
-  memfrob (stack, sizeof stack);
+  explicit_bzero (stack, sizeof stack);
   (*f) ();
   memfrob (stack, sizeof stack);
 }