File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -2596,7 +2596,13 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
25962596 else {
25972597 body -> is_entries = NULL ;
25982598 }
2599- body -> call_data = ZALLOC_N (struct rb_call_data , body -> ci_size );
2599+
2600+ if (body -> ci_size ) {
2601+ body -> call_data = ZALLOC_N (struct rb_call_data , body -> ci_size );
2602+ }
2603+ else {
2604+ body -> call_data = NULL ;
2605+ }
26002606 ISEQ_COMPILE_DATA (iseq )-> ci_index = 0 ;
26012607
26022608 // Calculate the bitmask buffer size.
@@ -13370,6 +13376,11 @@ ibf_load_ci_entries(const struct ibf_load *load,
1337013376 unsigned int ci_size ,
1337113377 struct rb_call_data * * cd_ptr )
1337213378{
13379+ if (!ci_size ) {
13380+ * cd_ptr = NULL ;
13381+ return ;
13382+ }
13383+
1337313384 ibf_offset_t reading_pos = ci_entries_offset ;
1337413385
1337513386 unsigned int i ;
You can’t perform that action at this time.
0 commit comments