[前][次][番号順一覧][スレッド一覧]

ruby-changes:47293

From: nagachika <ko1@a...>
Date: Sun, 23 Jul 2017 17:49:43 +0900 (JST)
Subject: [ruby-changes:47293] nagachika:r59408 (ruby_2_4): merge revision(s) 58902: [Backport #13595]

nagachika	2017-07-23 17:49:34 +0900 (Sun, 23 Jul 2017)

  New Revision: 59408

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59408

  Log:
    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]

  Modified directories:
    branches/ruby_2_4/
  Modified files:
    branches/ruby_2_4/include/ruby/ruby.h
    branches/ruby_2_4/version.h
Index: ruby_2_4/version.h
===================================================================
--- ruby_2_4/version.h	(revision 59407)
+++ ruby_2_4/version.h	(revision 59408)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/version.h#L1
 #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
Index: ruby_2_4/include/ruby/ruby.h
===================================================================
--- ruby_2_4/include/ruby/ruby.h	(revision 59407)
+++ ruby_2_4/include/ruby/ruby.h	(revision 59408)
@@ -1618,7 +1618,7 @@ static inline void * https://github.com/ruby/ruby/blob/trunk/ruby_2_4/include/ruby/ruby.h#L1618
 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);
 	}
Index: ruby_2_4
===================================================================
--- ruby_2_4	(revision 59407)
+++ ruby_2_4	(revision 59408)

Property changes on: ruby_2_4
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
   Merged /trunk:r58902

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]