1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

MJIT: Add assertions for mjit_capture_cc_entries

to investigate SEGVs in it
This commit is contained in:
Takashi Kokubun 2022-07-12 00:07:13 -07:00
parent e99e1f0f3f
commit ba8f3d2c6c
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -1155,6 +1155,10 @@ mjit_iseq_cc_entries(const struct rb_iseq_constant_body *const body)
int
mjit_capture_cc_entries(const struct rb_iseq_constant_body *compiled_iseq, const struct rb_iseq_constant_body *captured_iseq)
{
VM_ASSERT(compiled_iseq != NULL);
VM_ASSERT(compiled_iseq->jit_unit != NULL);
VM_ASSERT(captured_iseq != NULL);
struct rb_mjit_unit *unit = compiled_iseq->jit_unit;
unsigned int new_entries_size = unit->cc_entries_size + captured_iseq->ci_size;
VM_ASSERT(captured_iseq->ci_size > 0);