Skip to content

Commit

Permalink
Fix incorrect handle type count when FEATURE_SIZED_REF_HANDLES is not…
Browse files Browse the repository at this point in the history
… defined (dotnet#107433)

Regression from dotnet#107326 - without `FEATURE_SIZED_REF_HANDLES` defined, this was incorrectly passing an array of two handle types - HNDTYPE_STRONG and HNDTYPE_WEAK_SHORT (0) - when promoting objects pointed to by strong handles.
  • Loading branch information
elinor-fung authored and sirntar committed Sep 30, 2024
1 parent ee27c88 commit e0c6d70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coreclr/gc/objecthandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ void Ref_TraceNormalRoots(uint32_t condemned, uint32_t maxgen, ScanContext* sc,

// promote objects pointed to by strong handles
// during ephemeral GCs we also want to promote the ones pointed to by sizedref handles.
uint32_t types[2] = {
uint32_t types[] = {
HNDTYPE_STRONG,
#ifdef FEATURE_SIZED_REF_HANDLES
HNDTYPE_SIZEDREF
Expand Down

0 comments on commit e0c6d70

Please sign in to comment.