aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-27 13:16:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-27 13:16:25 +0000
commitd7b106db6f447709aca83ddbdef2b17df363627d (patch)
treec412f1c0e0567c5d98011a6cfa74306f931226a5 /thread_pthread.c
parenta97bb1a2f71c7d67b68dc61a2c8567fda132c91b (diff)
downloadruby-d7b106db6f447709aca83ddbdef2b17df363627d.tar.gz
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
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c2
1 files changed, 1 insertions, 1 deletions
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