projects
/
platform
/
upstream
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45af542
)
Use TASK_THREAD_TIMES_INFO_COUNT when calling task_info with TASK_THREAD_TIMES_INFO
author
Flavio Cruz
<flaviocruz@gmail.com>
Wed, 17 May 2023 02:59:24 +0000
(22:59 -0400)
committer
Samuel Thibault
<samuel.thibault@ens-lyon.org>
Wed, 17 May 2023 17:23:10 +0000
(19:23 +0200)
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>
sysdeps/mach/clock_gettime.c
patch
|
blob
|
history
diff --git
a/sysdeps/mach/clock_gettime.c
b/sysdeps/mach/clock_gettime.c
index
cc8c821
..
be775ed
100644
(file)
--- 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_
EVENT
S_INFO_COUNT;
+ count = TASK_
THREAD_TIME
S_INFO_COUNT;
err = __task_info (__mach_task_self (), TASK_THREAD_TIMES_INFO,
(task_info_t) &tti, &count);
if (err)