From d7b106db6f447709aca83ddbdef2b17df363627d Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 27 Jan 2014 13:16:25 +0000 Subject: thread_pthread.c: cast to size_t * thread_pthread.c (ruby_stack_overflowed_p): range of rlim_cur may be larger than size_t. [ruby-core:60113] [Bug #9454] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_pthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'thread_pthread.c') diff --git a/thread_pthread.c b/thread_pthread.c index 20c94d9185..257911cdd0 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -1566,7 +1566,7 @@ ruby_stack_overflowed_p(const rb_thread_t *th, const void *addr) if (pthread_equal(th->thread_id, native_main_thread.id)) { struct rlimit rlim; if (getrlimit(RLIMIT_STACK, &rlim) == 0 && rlim.rlim_cur > size) { - size = rlim.rlim_cur; + size = (size_t)rlim.rlim_cur; } } #endif -- cgit v1.2.3