From: Ivan Maidanski Date: Thu, 14 Feb 2019 19:55:20 +0000 (+0300) Subject: Fix thread_info() count argument value (OS X) X-Git-Tag: v8.0.4~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5b5ae303604f97338f3fd574fd948be3049e0b5b;p=gc 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(). --- diff --git a/darwin_stop_world.c b/darwin_stop_world.c index ab0be9d8..2872bc03 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)