File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -10717,6 +10717,14 @@ size_t gc_heap::sort_mark_list()
10717
10717
size_t region_index = get_basic_region_index_for_address (heap_segment_mem (region));
10718
10718
uint8_t* region_limit = heap_segment_allocated (region);
10719
10719
10720
+ // Due to GC holes, x can point to something in a region that already got freed. And that region's
10721
+ // allocated would be 0 and cause an infinite loop which is much harder to handle on production than
10722
+ // simply throwing an exception.
10723
+ if (region_limit == 0)
10724
+ {
10725
+ FATAL_GC_ERROR();
10726
+ }
10727
+
10720
10728
uint8_t*** mark_list_piece_start_ptr = &mark_list_piece_start[region_index];
10721
10729
uint8_t*** mark_list_piece_end_ptr = &mark_list_piece_end[region_index];
10722
10730
#else // USE_REGIONS
You can’t perform that action at this time.
0 commit comments