Add assertions against passing a NULL pointer parameter in
ukthread2pid / ukthread2tid.
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Ioan-Teodor Teugea <ioan_teodor.teugea@stud.acs.upb.ro>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
Approved-by: Andrei Tatar <andrei@unikraft.io>
GitHub-Closes: #1248
{
struct posix_thread *pthread;
+ UK_ASSERT(thread);
+
pthread = uk_thread_uktls_var(thread, pthread_self);
if (!pthread)
return -ENOTSUP;
{
struct posix_thread *pthread;
+ UK_ASSERT(thread);
+
pthread = uk_thread_uktls_var(thread, pthread_self);
if (!pthread)
return -ENOTSUP;