summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-30 15:49:32 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-30 15:49:32 +0000
commit4d683d0566a16c3a7bc0d91bb92a36358613cf63 (patch)
treea1da4f513d17d1554c64dd156720f47e70a97445
parented22c21a8f4e0c98045efb6de245fba79ec7e961 (diff)
merge revision(s) r48999,r49484: [Backport #10646]
* gc.c (wmap_final_func): fix memory size shortage when realloc wmap. Fix SEGV during finilize of WeakRef on Solaris (though the SEGV could occur on all OS/platforms). [ruby-dev:48779] [Bug #10646] Fix SEGV during finalize of WeakRef on Solaris (though the SEGV git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@50132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--gc.c2
-rw-r--r--version.h2
3 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 953dc96790..3745a2d304 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Mar 31 00:49:23 2015 Naohisa Goto <ngotogenome@gmail.com>
+
+ * gc.c (wmap_final_func): fix memory size shortage when realloc wmap.
+ Fix SEGV during finalize of WeakRef on Solaris (though the SEGV
+ could occur on all OS/platforms). [ruby-dev:48779] [Bug #10646]
+
Tue Mar 31 00:38:14 2015 Seiei Higa <hanachin@gmail.com>
* vm_method.c (rb_method_entry): if no super class, no original
diff --git a/gc.c b/gc.c
index cc37327463..f9048e031a 100644
--- a/gc.c
+++ b/gc.c
@@ -6413,7 +6413,7 @@ wmap_final_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing)
return ST_DELETE;
}
if (j < i) {
- ptr = ruby_sized_xrealloc2(ptr, j, sizeof(VALUE), i);
+ ptr = ruby_sized_xrealloc2(ptr, j + 1, sizeof(VALUE), i);
ptr[0] = j;
*value = (st_data_t)ptr;
}
diff --git a/version.h b/version.h
index 94b9d22f16..bd5dbad4aa 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.1.5"
#define RUBY_RELEASE_DATE "2015-03-31"
-#define RUBY_PATCHLEVEL 327
+#define RUBY_PATCHLEVEL 328
#define RUBY_RELEASE_YEAR 2015
#define RUBY_RELEASE_MONTH 3