[PATCH] nptl: Add smoke test for pthread_getcpuclockid failure
Florian Weimer
fweimer@redhat.com
Fri Nov 22 07:42:51 GMT 2024
* Siddhesh Poyarekar:
> +int
> +do_test (void)
> +{
> + pthread_t t = xpthread_create (NULL, thr, NULL);
> + xpthread_join (t);
> +
> + clockid_t c;
> + TEST_COMPARE (pthread_getcpuclockid (t, &c), ESRCH);
This test is invalid because the lifetime of t has ended. This
use-after-free bug becomes visible if you run the test with
GLIBC_TUNABLES=glibc.pthread.stack_cache_size=0.
Thanks,
Florian
More information about the Libc-alpha
mailing list