You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ICorDebugProcess5::EnumerateGCReferences doesn't include finalizer queue references #129559
During code review I noticed that we have missing functionality. The ICorDebugProcess5::EnumerateGCReferences API claims that it will provide a full set of GC roots but it doesn't enumerate the finalizer queue. The DacRefWalker type has a parameter BOOL walkFQ that implies it should support this but nothing reads the mWalkFQ variable it sets. There is also some code in DacRefWalker::Next() that would iterate using mFQCurr and mFQEnd but nothing sets those fields to non-NULL values so the loop body is dead code.
PR #129345 removed some of the dead code making the missing behavior more obvious.
Reproduction Steps
I identified the issue from code review and didn't test a repro. I assume it could be reproed by writing a debugger using ICorDebug, attach to a process that has an object rooted by the finalizer queue, and then run ICorDebugProcess5::EnumerateGCReferences.
Expected behavior
ICorDebugProcess5::EnumerateGCReferences would enumerate the object in the finalizer queue
Actual behavior
ICorDebugProcess5::EnumerateGCReferences would not enumerate the object in the finalizer queue
Regression?
Git history suggests this codepath has been dead for at least the entire time the source has been open and perhaps it never worked.
Known Workarounds
No response
Configuration
Any version of .NET Core, any OS, any architecture
Activity
dotnet-policy-service commentedon Jun 18, 2026
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.
MihuBot commentedon Jun 18, 2026
I'm a bot. Here is a possible related and/or duplicate issue (I may be wrong):