public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Samuel Thibault <sthibaul@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] Use TASK_THREAD_TIMES_INFO_COUNT when calling task_info with TASK_THREAD_TIMES_INFO
Date: Wed, 17 May 2023 17:23:32 +0000 (GMT)	[thread overview]
Message-ID: <20230517172332.A29963858C78@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3f7b800d54eb67d9b97f6e0933275155fdf13c70

commit 3f7b800d54eb67d9b97f6e0933275155fdf13c70
Author: Flavio Cruz <flaviocruz@gmail.com>
Date:   Tue May 16 22:59:24 2023 -0400

    Use TASK_THREAD_TIMES_INFO_COUNT when calling task_info with TASK_THREAD_TIMES_INFO
    
    This hasn't caused any problems yet but we are passing a pointer to struct
    task_thread_times_info which can cause problems if we populate over the
    existing size of the struct.
    Message-Id: <ZGRDDNcOM2hA3CuT@jupiter.tail36e24.ts.net>

Diff:
---
 sysdeps/mach/clock_gettime.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/mach/clock_gettime.c b/sysdeps/mach/clock_gettime.c
index cc8c821a7f..be775ed2bb 100644
--- a/sysdeps/mach/clock_gettime.c
+++ b/sysdeps/mach/clock_gettime.c
@@ -62,7 +62,7 @@ __clock_gettime (clockid_t clock_id, struct timespec *ts)
 	time_value_add (&t, &bi.system_time);
 
 	/* Live threads CPU time.  */
-	count = TASK_EVENTS_INFO_COUNT;
+	count = TASK_THREAD_TIMES_INFO_COUNT;
 	err = __task_info (__mach_task_self (), TASK_THREAD_TIMES_INFO,
 			   (task_info_t) &tti, &count);
 	if (err)

                 reply	other threads:[~2023-05-17 17:23 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=20230517172332.A29963858C78@sourceware.org \
    --to=sthibaul@sourceware.org \
    --cc=glibc-cvs@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).