[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: glibc regression on alpha with 2.34+



Hi!

On 12/14/22 21:16, Frank Scheiner wrote:
I'll do that tomorrow. The thing is that this diff doesn't apply cleanly:

Which version of the workaround diff did you use? There are two.

There is one that applies cleanly on top of 6c57d320484988e87e446e2e60ce42816bf51d53
and a second one that applies cleanly on top of glibc-2.34, I posted both. There were
some changes between 6c57d320484988e87e446e2e60ce42816bf51d53 and glibc-2.34 in the
minstksize/stksize code which is why you need the second diff that was also part of
my mail.

I'm attaching the second diff as a patch.

Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c
index d47bef1340..8462e5859a 100644
--- a/elf/dl-sysdep.c
+++ b/elf/dl-sysdep.c
@@ -116,10 +116,10 @@ _dl_sysdep_start (void **start_argptr,
   user_entry = (ElfW(Addr)) ENTRY_POINT;
   GLRO(dl_platform) = NULL; /* Default to nothing known about the platform.  */
 
-  /* NB: Default to a constant CONSTANT_MINSIGSTKSZ.  */
-  _Static_assert (__builtin_constant_p (CONSTANT_MINSIGSTKSZ),
-		  "CONSTANT_MINSIGSTKSZ is constant");
-  GLRO(dl_minsigstacksize) = CONSTANT_MINSIGSTKSZ;
+  /* /\* NB: Default to a constant CONSTANT_MINSIGSTKSZ.  *\/ */
+  /* _Static_assert (__builtin_constant_p (CONSTANT_MINSIGSTKSZ), */
+  /* 		  "CONSTANT_MINSIGSTKSZ is constant"); */
+  /* GLRO(dl_minsigstacksize) = CONSTANT_MINSIGSTKSZ; */
 
   for (av = GLRO(dl_auxv); av->a_type != AT_NULL; set_seen (av++))
     switch (av->a_type)
@@ -185,9 +185,9 @@ _dl_sysdep_start (void **start_argptr,
       case AT_RANDOM:
 	_dl_random = (void *) av->a_un.a_val;
 	break;
-      case AT_MINSIGSTKSZ:
-	GLRO(dl_minsigstacksize) = av->a_un.a_val;
-	break;
+      /* case AT_MINSIGSTKSZ: */
+      /* 	GLRO(dl_minsigstacksize) = av->a_un.a_val; */
+      /* 	break; */
       DL_PLATFORM_AUXV
       }
 
diff --git a/elf/rtld_static_init.c b/elf/rtld_static_init.c
index 3f8abb6800..aeac492235 100644
--- a/elf/rtld_static_init.c
+++ b/elf/rtld_static_init.c
@@ -67,9 +67,9 @@ __rtld_static_init (struct link_map *map)
   dl->_dl_hwcap = _dl_hwcap;
   extern __typeof (dl->_dl_hwcap2) _dl_hwcap2 attribute_hidden;
   dl->_dl_hwcap2 = _dl_hwcap2;
-  extern __typeof (dl->_dl_minsigstacksize) _dl_minsigstacksize
-    attribute_hidden;
-  dl->_dl_minsigstacksize = _dl_minsigstacksize;
+  /* extern __typeof (dl->_dl_minsigstacksize) _dl_minsigstacksize */
+  /*   attribute_hidden; */
+  /* dl->_dl_minsigstacksize = _dl_minsigstacksize; */
   extern __typeof (dl->_dl_pagesize) _dl_pagesize attribute_hidden;
   dl->_dl_pagesize = _dl_pagesize;
   extern __typeof (dl->_dl_tls_static_align) _dl_tls_static_align
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 9c15259236..62117727e1 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -545,9 +545,6 @@ struct rtld_global_ro
   /* Cached value of `getpagesize ()'.  */
   EXTERN size_t _dl_pagesize;
 
-  /* Cached value of `sysconf (_SC_MINSIGSTKSZ)'.  */
-  EXTERN size_t _dl_minsigstacksize;
-
   /* Do we read from ld.so.cache?  */
   EXTERN int _dl_inhibit_cache;
 
diff --git a/sysdeps/unix/sysv/linux/sysconf-pthread_stack_min.h b/sysdeps/unix/sysv/linux/sysconf-pthread_stack_min.h
index 9e0eb0f7fc..2ba132e1fe 100644
--- a/sysdeps/unix/sysv/linux/sysconf-pthread_stack_min.h
+++ b/sysdeps/unix/sysv/linux/sysconf-pthread_stack_min.h
@@ -22,7 +22,7 @@ static inline long int
 __get_pthread_stack_min (void)
 {
   /* sysconf (_SC_THREAD_STACK_MIN) >= sysconf (_SC_MINSIGSTKSZ).  */
-  long int pthread_stack_min = GLRO(dl_minsigstacksize);
+  long int pthread_stack_min = 4096;
   assert (pthread_stack_min != 0);
   _Static_assert (__builtin_constant_p (PTHREAD_STACK_MIN),
 		  "PTHREAD_STACK_MIN is constant");
diff --git a/sysdeps/unix/sysv/linux/sysconf.c b/sysdeps/unix/sysv/linux/sysconf.c
index daaeeb7d36..24afb2fdc5 100644
--- a/sysdeps/unix/sysv/linux/sysconf.c
+++ b/sysdeps/unix/sysv/linux/sysconf.c
@@ -84,11 +84,11 @@ __sysconf (int name)
       break;
 
     case _SC_MINSIGSTKSZ:
-      assert (GLRO(dl_minsigstacksize) != 0);
-      return GLRO(dl_minsigstacksize);
+      //      assert (GLRO(dl_minsigstacksize) != 0);
+      return 4096; // GLRO(dl_minsigstacksize);
 
     case _SC_SIGSTKSZ:
-      return sysconf_sigstksz ();
+      return 16384 ; //sysconf_sigstksz ();
 
     default:
       break;

Reply to: