mailing list of musl libc
 help / color / mirror / Atom feed
* [musl] [PATCH v2] A small type change in __init_tls
@ 2021-05-25 15:46 Joe Ramsay
  0 siblings, 0 replies; only message in thread
From: Joe Ramsay @ 2021-05-25 15:46 UTC (permalink / raw)
  To: musl

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.

 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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-25 15:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25 15:46 [musl] [PATCH v2] A small type change in __init_tls Joe Ramsay

mailing list of musl libc

This inbox may be cloned and mirrored by anyone:

	git clone --mirror

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 musl musl/ \
	public-inbox-index musl

Example config snippet for mirrors.
Newsgroup available over NNTP:

code repositories for the project(s) associated with this inbox:

AGPL code for this site: git clone