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
This commit is contained in:
parent
a97bb1a2f7
commit
d7b106db6f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user