From 265c4a4fbd4e9871d65956f74315036817fd5170 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 14 Feb 2019 22:55:20 +0300 Subject: [PATCH] Fix thread_info() count argument value (OS X) * darwin_stop_world.c [DEBUG_THREADS || GC_ASSERTIONS] (GC_thread_resume): Set outCount to THREAD_BASIC_INFO_COUNT (instead of THREAD_INFO_MAX) to match the size of info passed to thread_info(). --- darwin_stop_world.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/darwin_stop_world.c b/darwin_stop_world.c index ab0be9d..2872bc0 100644 --- a/darwin_stop_world.c +++ b/darwin_stop_world.c @@ -656,7 +656,8 @@ GC_INLINE void GC_thread_resume(thread_act_t thread) kern_return_t kern_result; # if defined(DEBUG_THREADS) || defined(GC_ASSERTIONS) struct thread_basic_info info; - mach_msg_type_number_t outCount = THREAD_INFO_MAX; + mach_msg_type_number_t outCount = THREAD_BASIC_INFO_COUNT; + kern_result = thread_info(thread, THREAD_BASIC_INFO, (thread_info_t)&info, &outCount); if (kern_result != KERN_SUCCESS) -- 2.7.4