зеркало из https://github.com/github/ruby.git
* array.c (ary_make_shared): make shared array shady.
Making non-shady shared array causes SEGV (see rubyci). It seems a bug around shared array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
e6a6dd8e7e
Коммит
45e8268d62
|
@ -1,3 +1,9 @@
|
|||
Sat Jul 20 14:38:00 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* array.c (ary_make_shared): make shared array shady.
|
||||
Making non-shady shared array causes SEGV (see rubyci).
|
||||
It seems a bug around shared array.
|
||||
|
||||
Sat Jul 20 12:14:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* string.c (enc_succ_char, enc_pred_char): consider wchar case.
|
||||
|
|
4
array.c
4
array.c
|
@ -612,8 +612,8 @@ ary_make_shared(VALUE ary)
|
|||
FL_UNSET_EMBED(shared);
|
||||
|
||||
ARY_SET_LEN((VALUE)shared, ARY_CAPA(ary));
|
||||
ARY_SET_PTR((VALUE)shared, RARRAY_RAWPTR(ary));
|
||||
ary_mem_clear((VALUE)shared, RARRAY_LEN(ary), ARY_CAPA(ary) - RARRAY_LEN(ary));
|
||||
ARY_SET_PTR((VALUE)shared, RARRAY_PTR(ary));
|
||||
rb_mem_clear(RARRAY_PTR(shared) + RARRAY_LEN(ary), ARY_CAPA(ary) - RARRAY_LEN(ary));
|
||||
FL_SET_SHARED_ROOT(shared);
|
||||
ARY_SET_SHARED_NUM((VALUE)shared, 1);
|
||||
FL_SET_SHARED(ary);
|
||||
|
|
Загрузка…
Ссылка в новой задаче