Date: Wed, 7 May 2025 21:20:53 GMT From: Jessica Clarke <jrtc27@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: b640600834e7 - main - rtld-elf: Use size_t rather than uintptr_t for an index Message-ID: <202505072120.547LKrrP064707@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=b640600834e73178056caa9a07f981b707eb40e7 commit b640600834e73178056caa9a07f981b707eb40e7 Author: Jessica Clarke <jrtc27@FreeBSD.org> AuthorDate: 2025-05-07 21:20:48 +0000 Commit: Jessica Clarke <jrtc27@FreeBSD.org> CommitDate: 2025-05-07 21:20:48 +0000 rtld-elf: Use size_t rather than uintptr_t for an index This was previously an Elf_Addr and was turned into a uintptr_t when really it should have been made a size_t. Even on CHERI both actually work in this case, but it's better style (and more consistent with elsewhere in the file) to use size_t instead. Fixes: 4642b638a522 ("rtld-elf: Consistently use uintptr_t for TLS implementation") --- libexec/rtld-elf/rtld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 3a6863abfe0d..03b4cd2bdda4 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -5443,7 +5443,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) struct dtv *dtv; struct tcb *tcb; char *addr; - uintptr_t i; + size_t i; size_t extra_size, maxalign, post_size, pre_size, tls_block_size; size_t tls_init_align, tls_init_offset;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505072120.547LKrrP064707>