projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a31bf6
)
need to check if the child obj is on an ro region (#67729)
author
Maoni Stephens
<Maoni0@users.noreply.github.com>
Fri, 8 Apr 2022 06:50:39 +0000
(23:50 -0700)
committer
GitHub
<noreply@github.com>
Fri, 8 Apr 2022 06:50:39 +0000
(23:50 -0700)
when we check if a card is needed, we need to check if the child obj is in an ro region before getting its gen_num since there's no region data structure for it.
src/coreclr/gc/gc.cpp
patch
|
blob
|
history
diff --git
a/src/coreclr/gc/gc.cpp
b/src/coreclr/gc/gc.cpp
index
0b64b0c
..
a89bf11
100644
(file)
--- a/
src/coreclr/gc/gc.cpp
+++ b/
src/coreclr/gc/gc.cpp
@@
-43062,7
+43062,7
@@
BOOL gc_heap::check_need_card (uint8_t* child_obj, int gen_num_for_cards,
uint8_t* low, uint8_t* high)
{
#ifdef USE_REGIONS
- return (
get_region_gen_num (child_obj) < gen_num_for_cards
);
+ return (
is_in_heap_range (child_obj) && (get_region_gen_num (child_obj) < gen_num_for_cards)
);
#else
return ((child_obj < high) && (child_obj >= low));
#endif //USE_REGIONS