summaryrefslogtreecommitdiff
path: root/darwin_stop_world.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2019-02-14 22:55:20 +0300
committerIvan Maidanski <ivmai@mail.ru>2019-02-14 22:55:20 +0300
commit265c4a4fbd4e9871d65956f74315036817fd5170 (patch)
treeb9266672955d29fad2f976068e341aa5f47387fa /darwin_stop_world.c
parente1ef3b22499d5cf2788219760cb40c6beddb8cba (diff)
downloadbdwgc-265c4a4fbd4e9871d65956f74315036817fd5170.tar.gz
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().
Diffstat (limited to 'darwin_stop_world.c')
-rw-r--r--darwin_stop_world.c3
1 files changed, 2 insertions, 1 deletions
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)