Skip to content

Commit 7632a82

Browse files
author
ngoto
committed
* 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent e13315d commit 7632a82

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Thu Dec 25 17:30:40 2014 Naohisa Goto <ngotogenome@gmail.com>
2+
3+
* gc.c (wmap_final_func): fix memory size shortage when realloc wmap.
4+
Fix SEGV during finilize of WeakRef on Solaris (though the SEGV
5+
could occur on all OS/platforms). [ruby-dev:48779] [Bug #10646]
6+
17
Thu Dec 25 17:27:06 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
28

39
* configure.in (NET_LUID): include winsock2.h instead of windows.h.

gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7672,7 +7672,7 @@ wmap_final_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing)
76727672
return ST_DELETE;
76737673
}
76747674
if (j < i) {
7675-
ptr = ruby_sized_xrealloc2(ptr, j, sizeof(VALUE), i);
7675+
ptr = ruby_sized_xrealloc2(ptr, j + 1, sizeof(VALUE), i);
76767676
ptr[0] = j;
76777677
*value = (st_data_t)ptr;
76787678
}

0 commit comments

Comments
 (0)