diff options
author | eileencodes <[email protected]> | 2021-06-23 13:28:22 -0400 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2021-06-23 11:34:37 -0700 |
commit | 31f4d262736c224a37e7c630a0790d40b11cdd57 (patch) | |
tree | 370a84d407434f1ab89c1b95bd6c4b67431b3d7e /compile.c | |
parent | b29c48efc0b08a52b6f72cf8f0ac16b93e373a5c (diff) |
Check type of instruction - can be INSN or ADJUST
If the type is ADJUST we don't want to treat it like an INSN so we have
to check the type before reading from `insn_info.events`.
[Bug #18001] [ruby-core:104371]
Co-authored-by: Aaron Patterson <[email protected]>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4601
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -3088,6 +3088,7 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal */ int stop_optimization = ISEQ_COVERAGE(iseq) && ISEQ_LINE_COVERAGE(iseq) && + nobj->link.type == ISEQ_ELEMENT_INSN && nobj->insn_info.events; if (!stop_optimization) { INSN *pobj = (INSN *)iobj->link.prev; |