// [1] https://github.com/externalist/exploit_playground/blob/master/empty_list/empty_list/empty_list/sploit.c #include "utils.h" void for_other_threads(void (^handler)(thread_act_t thread)) { thread_act_t thread_self = mach_thread_self(); thread_act_port_array_t list; mach_msg_type_number_t count; kern_return_t kr = 0; kr = task_threads(mach_task_self(), &list, &count); if (kr != KERN_SUCCESS) { LOG("task_threads failed"); return; } for (int i=0; i