This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [BZ#17090/17620/17621]: fix DTV race, assert, and DTV_SURPLUS Static TLS limit


On Wed, Mar 04, 2015 at 03:35:29PM +1030, Alan Modra wrote:
> As does nptl/tst-stack4 on x86_64 if tst-stack4mod.so is built with
> -mtls-dialect=gnu2.

This on top of your patch gets me past the segfault in free().

diff --git a/elf/dl-tls.c b/elf/dl-tls.c
index 311cc6d..44e2a2b 100644
--- a/elf/dl-tls.c
+++ b/elf/dl-tls.c
@@ -674,6 +674,9 @@ _dl_update_slotinfo (unsigned long int req_modid)
 	      struct link_map *map = listp->slotinfo[cnt].map;
 	      if (map == NULL)
 		{
+		  if (dtv[-1].counter < total + cnt)
+		    continue;
+
 		  /* If this modid was used at some point the memory
 		     might still be allocated.  */
 		  if (! dtv[total + cnt].pointer.is_static

I now hit another segfault, tst-stack4mod.c:function somehow has
var == NULL.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]