mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
compile.c: Fix segfault when VM_INSN_INFO_TABLE_IMPL is not 2
* compile.c (ibf_dump_iseq_each): Fix a range of a conditional. `positions` is only used when VM_INSN_INFO_TABLE_IMPL is 2. And always `dump_body` is expected to be initialized by `iseq->body`. For example, `dump_body->insns_info.size` is used in `ibf_dump_insns_info_positions`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
83be2ce40f
commit
8b88f70a84
1 changed files with 2 additions and 2 deletions
|
@ -8900,10 +8900,10 @@ static ibf_offset_t
|
|||
ibf_dump_iseq_each(struct ibf_dump *dump, const rb_iseq_t *iseq)
|
||||
{
|
||||
struct rb_iseq_constant_body dump_body;
|
||||
unsigned int *positions;
|
||||
#if VM_INSN_INFO_TABLE_IMPL == 2
|
||||
dump_body = *iseq->body;
|
||||
unsigned int *positions;
|
||||
#endif
|
||||
dump_body = *iseq->body;
|
||||
|
||||
dump_body.location.pathobj = ibf_dump_object(dump, dump_body.location.pathobj); /* TODO: freeze */
|
||||
dump_body.location.base_label = ibf_dump_object(dump, dump_body.location.base_label);
|
||||
|
|
Loading…
Add table
Reference in a new issue