git-task_info_count
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Wed, 31 Jan 2024 20:45:37 +0000 (21:45 +0100)
committerAurelien Jarno <aurel32@debian.org>
Wed, 31 Jan 2024 20:45:37 +0000 (21:45 +0100)
commit baeb4015426e6724127829ead4fb39cfb377a3d9
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>

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-task_info_count.diff

sysdeps/mach/clock_gettime.c

index cc8c821a7fc256fa141af270a1d2df2b1eb0f701..be775ed2bb41145f9ff42d0839129cf87a071a1a 100644 (file)
@@ -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)