public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org,  Szabolcs Nagy <Szabolcs.Nagy@arm.com>,
	Carlos O'Donell <carlos@redhat.com>
Subject: Re: [PATCH] elf: Fix DTV gap reuse logic (BZ #27135)
Date: Thu, 08 Jul 2021 08:00:43 +0200	[thread overview]
Message-ID: <87czrtz6no.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20210628180358.235038-1-adhemerval.zanella@linaro.org> (Adhemerval Zanella's message of "Mon, 28 Jun 2021 15:03:58 -0300")

* Adhemerval Zanella:

> diff --git a/elf/dl-tls.c b/elf/dl-tls.c
> index 2b5161d10a..4ec4c7f38c 100644
> --- a/elf/dl-tls.c
> +++ b/elf/dl-tls.c
> @@ -157,7 +157,11 @@ _dl_next_tls_modid (void)
>  	      }
>  
>  	    if (result - disp < runp->len)
> -	      break;
> +	      {
> +		/* Mark the entry as used, so any dependency see it.  */
> +		runp->slotinfo[result - disp].map = (struct link_map *) -1;
> +		break;
> +	      }
>  
>  	    disp += runp->len;
>  	  }

Which dependency?

I think the special value -1 needs to be documented on the slotinfo
struct member.

When Carlos and I discussed this, we couldn't quite decide whether it
was appropriate just to assign the actual link map value here.

Thanks,
Florian


  reply	other threads:[~2021-07-08  6:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 18:03 Adhemerval Zanella
2021-07-08  6:00 ` Florian Weimer [this message]
2021-07-08 11:00   ` Szabolcs Nagy
2021-07-08 12:20     ` Adhemerval Zanella
2021-07-08 13:04       ` Szabolcs Nagy
2021-07-08 13:34         ` Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czrtz6no.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=Szabolcs.Nagy@arm.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=carlos@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).