Fix objRef not being stored in GetPointerData after DebuggerIPCE_ObjectData refactor#129539
Open
tommcdon wants to merge 2 commits into
Open
Fix objRef not being stored in GetPointerData after DebuggerIPCE_ObjectData refactor#129539tommcdon wants to merge 2 commits into
tommcdon wants to merge 2 commits into
Conversation
…ctData refactor PR dotnet#129200 refactored DebuggerIPCE_ObjectData into DacDbiObjectData, changing objRef from void* to CORDB_ADDRESS. In GetPointerData, the local copy path reads the object reference from localValue into a temporary void* but never writes it back to m_info.objRef. The reference is lost, causing subsequent dereferences to fail. This breaks debugger visualization for any value type that goes through GetPointerData (byref, pointer types), including Span<T> whose internal ByReference<T> field is read through this path. Fix by writing the read pointer back to m_info.objRef after localCopy. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR corrects CordbReferenceValue::GetPointerData so that when the object reference is sourced from a local cached buffer (localValue), the read pointer is actually persisted into m_info.objRef (so subsequent operations use the correct address).
Changes:
- Read the pointer value from
localValueinto a temporaryvoid*. - Store the read pointer back into
m_info.objRefviaPTR_TO_CORDB_ADDRESS(...).
rcj1
approved these changes
Jun 17, 2026
noahfalk
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In GetPointerData, the local copy path reads the object reference from
localValueinto a temporaryvoid*but never writes it back tom_info.objRef. The reference is lost, causing subsequent dereferences to fail.This breaks debugger visualization for any value type that goes through GetPointerData (byref, pointer types), including
Span<T>whose internalByReference<T>field is read through this path.Fix by writing the read pointer back to
m_info.objRefafterlocalCopy.