diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-23 08:49:34 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-23 08:49:34 +0000 |
commit | e7358e6063f525b654c5e1ce80003dd02eb86b7a (patch) | |
tree | 5e699338779e57709016e0ab23508f272cf66f2a | |
parent | 7867dbdd1c3d40bbe897dd957ea1326ed3b3fcb1 (diff) |
merge revision(s) 58902: [Backport #13595]
attempt to fix rb_alloc_tmp_buffer2 for ALLOCV_N
This is a confusing function to my arithmetic-challenged mind,
but nobu seems alright with this. Anyways this lets me use
large values of elsize without segfaulting, and "make exam"
passes.
* include/ruby/ruby.h (rb_alloc_tmp_buffer2): attempt to fix
[ruby-core:81388] [ruby-core:81391] [Bug #13595]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | include/ruby/ruby.h | 2 | ||||
-rw-r--r-- | version.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 1491f24ecb..5ca1f9cc55 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1618,7 +1618,7 @@ static inline void * rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize) { size_t cnt = (size_t)count; - if (elsize % sizeof(VALUE) == 0) { + if (elsize == sizeof(VALUE)) { if (RB_UNLIKELY(cnt > LONG_MAX / sizeof(VALUE))) { ruby_malloc_size_overflow(cnt, elsize); } @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.4.2" #define RUBY_RELEASE_DATE "2017-07-23" -#define RUBY_PATCHLEVEL 159 +#define RUBY_PATCHLEVEL 160 #define RUBY_RELEASE_YEAR 2017 #define RUBY_RELEASE_MONTH 7 |