diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-30 15:49:32 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-30 15:49:32 +0000 |
commit | 4d683d0566a16c3a7bc0d91bb92a36358613cf63 (patch) | |
tree | a1da4f513d17d1554c64dd156720f47e70a97445 | |
parent | ed22c21a8f4e0c98045efb6de245fba79ec7e961 (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-- | ChangeLog | 6 | ||||
-rw-r--r-- | gc.c | 2 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 8 insertions, 2 deletions
@@ -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 @@ -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; } @@ -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 |