Fix thread_info() count argument value (OS X)
authorIvan Maidanski <ivmai@mail.ru>
Thu, 14 Feb 2019 19:55:20 +0000 (22:55 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 14 Feb 2019 19:55:20 +0000 (22:55 +0300)
* 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

index ab0be9d..2872bc0 100644 (file)
@@ -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)