зеркало из https://github.com/github/ruby.git
* compile.c (iseq_set_exception_local_table, iseq_set_local_table,
rb_iseq_build_from_ary): fix type inconsistency (which is benign because sizeof(ID) == sizeof(ID*), though). Coverity Scan found these bugs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
e20d736467
Коммит
7b7210439c
|
@ -1,3 +1,10 @@
|
|||
Mon Nov 15 23:41:21 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* compile.c (iseq_set_exception_local_table, iseq_set_local_table,
|
||||
rb_iseq_build_from_ary): fix type inconsistency (which is benign
|
||||
because sizeof(ID) == sizeof(ID*), though). Coverity Scan found
|
||||
these bugs.
|
||||
|
||||
Mon Nov 15 22:47:27 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* vm_eval.c (rb_funcall): ensure va_end after va_init_list. Coverity
|
||||
|
|
|
@ -980,7 +980,7 @@ iseq_set_exception_local_table(rb_iseq_t *iseq)
|
|||
ID id_dollar_bang;
|
||||
|
||||
CONST_ID(id_dollar_bang, "#$!");
|
||||
iseq->local_table = (ID *)ALLOC_N(ID *, 1);
|
||||
iseq->local_table = (ID *)ALLOC_N(ID, 1);
|
||||
iseq->local_table_size = 1;
|
||||
iseq->local_size = iseq->local_table_size + 1;
|
||||
iseq->local_table[0] = id_dollar_bang;
|
||||
|
@ -1199,8 +1199,8 @@ iseq_set_local_table(rb_iseq_t *iseq, ID *tbl)
|
|||
}
|
||||
|
||||
if (size > 0) {
|
||||
iseq->local_table = (ID *)ALLOC_N(ID *, size);
|
||||
MEMCPY(iseq->local_table, tbl, ID *, size);
|
||||
iseq->local_table = (ID *)ALLOC_N(ID, size);
|
||||
MEMCPY(iseq->local_table, tbl, ID, size);
|
||||
}
|
||||
|
||||
iseq->local_size = iseq->local_table_size = size;
|
||||
|
@ -5372,7 +5372,7 @@ rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE locals, VALUE args,
|
|||
INIT_ANCHOR(anchor);
|
||||
|
||||
iseq->local_table_size = RARRAY_LENINT(locals);
|
||||
iseq->local_table = tbl = (ID *)ALLOC_N(ID *, iseq->local_table_size);
|
||||
iseq->local_table = tbl = (ID *)ALLOC_N(ID, iseq->local_table_size);
|
||||
iseq->local_size = iseq->local_table_size + 1;
|
||||
|
||||
for (i=0; i<RARRAY_LEN(locals); i++) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче