mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Joe Ramsay <Joe.Ramsay@arm.com>
To: "musl@lists.openwall.com" <musl@lists.openwall.com>
Subject: [musl] [PATCH v2] A small type change in __init_tls
Date: Tue, 25 May 2021 15:46:40 +0000	[thread overview]
Message-ID: <39354A43-2B16-4E29-930F-E17EA93EAB6B@arm.com> (raw)

Hi all,

Thanks for the previous review, and for explaining where I'd made some
wrong assumptions. I've pared the original patch down a bit.

This patch changes a size_t in static_init_tls to a uintptr_t, which
is a more appropriate type as the variable in question may contain a
pointer. Tested against libc-test with gcc 7 on x86 and clang 9 on
AArch64, with no new failures.

Thanks,
Joe
---
 src/env/__init_tls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/env/__init_tls.c b/src/env/__init_tls.c
index a93141ed..1d3d5eda 100644
--- a/src/env/__init_tls.c
+++ b/src/env/__init_tls.c
@@ -84,7 +84,7 @@ static void static_init_tls(size_t *aux)
        unsigned char *p;
        size_t n;
        Phdr *phdr, *tls_phdr=0;
-       size_t base = 0;
+       uintptr_t base = 0;
        void *mem;

        for (p=(void *)aux[AT_PHDR],n=aux[AT_PHNUM]; n; n--,p+=aux[AT_PHENT]) {
--
2.24.3 (Apple Git-128)


IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

                 reply	other threads:[~2021-05-25 15:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=39354A43-2B16-4E29-930F-E17EA93EAB6B@arm.com \
    --to=joe.ramsay@arm.com \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).