[review v4] Avoid late dlopen failure due to scope, TLS slotinfo updates [BZ #25112]

Carlos O'Donell (Code Review) gerrit@gnutoolchain-gerrit.osci.io
Wed Nov 27 16:16:00 GMT 2019


Carlos O'Donell has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/468
......................................................................


Patch Set 4: Code-Review+2

(1 comment)

This version looks good. Thanks for fixing the few nits and correcting comments. Sorry this took so long to review, this is some difficult code with few comments. Your work here has made this better for all future reviewers.

OK for master.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

| --- elf/dl-open.c
| +++ elf/dl-open.c
| @@ -217,0 +261,19 @@ resize_scopes (struct link_map *new)
| +
| +	      if (imap->l_scope != imap->l_scope_mem
| +		  && imap->l_scope_max < array_length (imap->l_scope_mem))
| +		{
| +		  new_size = array_length (imap->l_scope_mem);
| +		  newp = imap->l_scope_mem;
| +		}
| +	      else
| +		{
| +		  new_size = imap->l_scope_max * 2;

PS3, Line 270:

Your right. Sounds good to me.

| +		  newp = (struct r_scope_elem **)
| +		    malloc (new_size * sizeof (struct r_scope_elem *));
| +		  if (newp == NULL)
| +		    _dl_signal_error (ENOMEM, "dlopen", NULL,
| +				      N_("cannot create scope list"));
| +		}
| +
| +	      /* Copy the array and the terminating NULL.  */
| +	      memcpy (newp, imap->l_scope,

-- 
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: I240c58387dabda3ca1bcab48b02115175fa83d6c
Gerrit-Change-Number: 468
Gerrit-PatchSet: 4
Gerrit-Owner: Florian Weimer <fweimer@redhat.com>
Gerrit-Reviewer: Carlos O'Donell <carlos@redhat.com>
Gerrit-Reviewer: Florian Weimer <fweimer@redhat.com>
Gerrit-Comment-Date: Wed, 27 Nov 2019 16:16:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Florian Weimer <fweimer@redhat.com>
Comment-In-Reply-To: Carlos O'Donell <carlos@redhat.com>
Gerrit-MessageType: comment



More information about the Libc-alpha mailing list