Skip to content

Commit

Permalink
Check if the child object is in the heap range before get_region_plan…
Browse files Browse the repository at this point in the history
…_gen_num (#63828)
  • Loading branch information
cshung authored Jan 20, 2022
1 parent 5cefc0f commit 752569f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30136,6 +30136,8 @@ inline
void gc_heap::check_demotion_helper_sip (uint8_t** pval, int parent_gen_num, uint8_t* parent_loc)
{
uint8_t* child_object = *pval;
if (!is_in_heap_range (child_object))
return;
if (!child_object) return;
int child_object_plan_gen = get_region_plan_gen_num (child_object);

Expand Down

0 comments on commit 752569f

Please sign in to comment.