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 @@ -10687,6 +10687,14 @@ size_t gc_heap::sort_mark_list()
1068710687 size_t region_index = get_basic_region_index_for_address (heap_segment_mem (region));
1068810688 uint8_t* region_limit = heap_segment_allocated (region);
1068910689
10690+ // Due to GC holes, x can point to something in a region that already got freed. And that region's
10691+ // allocated would be 0 and cause an infinite loop which is much harder to handle on production than
10692+ // simply throwing an exception.
10693+ if (region_limit == 0)
10694+ {
10695+ FATAL_GC_ERROR();
10696+ }
10697+
1069010698 uint8_t*** mark_list_piece_start_ptr = &mark_list_piece_start[region_index];
1069110699 uint8_t*** mark_list_piece_end_ptr = &mark_list_piece_end[region_index];
1069210700#else // USE_REGIONS
You can’t perform that action at this time.
0 commit comments