ruby-changes:54146
From: ko1 <ko1@a...>
Date: Thu, 13 Dec 2018 02:12:13 +0900 (JST)
Subject: [ruby-changes:54146] ko1:r66367 (trunk): param.flags.has_kw flag should be FALSE before setting param.keyword.
ko1 2018-12-13 02:12:08 +0900 (Thu, 13 Dec 2018) New Revision: 66367 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66367 Log: param.flags.has_kw flag should be FALSE before setting param.keyword. * compile.c (ibf_load_iseq_each): iseq_mark assumes that if param.flags.has_kw is TRUE, then param.keyword is not NULL. To confirm this assumption, make it FALSE before param.keyword is initialized. Modified files: trunk/compile.c Index: compile.c =================================================================== --- compile.c (revision 66366) +++ compile.c (revision 66367) @@ -9100,6 +9100,7 @@ ibf_load_iseq_each(const struct ibf_load https://github.com/ruby/ruby/blob/trunk/compile.c#L9100 load_body->type = body->type; load_body->stack_max = body->stack_max; load_body->param = body->param; + load_body->param.flags.has_kw = FALSE; load_body->local_table_size = body->local_table_size; load_body->is_size = body->is_size; load_body->ci_size = body->ci_size; @@ -9149,6 +9150,7 @@ ibf_load_iseq_each(const struct ibf_load https://github.com/ruby/ruby/blob/trunk/compile.c#L9150 load_body->cc_entries = ZALLOC_N(struct rb_call_cache, body->ci_size + body->ci_kw_size); load_body->param.opt_table = ibf_load_param_opt_table(load, body); load_body->param.keyword = ibf_load_param_keyword(load, body); + load_body->param.flags.has_kw = body->param.flags.has_kw; load_body->insns_info.body = ibf_load_insns_info_body(load, body); load_body->insns_info.positions = ibf_load_insns_info_positions(load, body); load_body->local_table = ibf_load_local_table(load, body); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/