[cDAC] Implement IsThreadSuspendedOrHijacked for cDAC#131274
Open
barosiak wants to merge 2 commits into
Open
Conversation
|
Azure Pipelines: Successfully started running 4 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Implements DacDbiImpl.IsThreadSuspendedOrHijacked in the cDAC legacy DBI shim by deriving the result from the Thread contract’s ThreadData.State, and adds a dump-based integration test that cross-validates the DBI result against the contract’s state flags.
Changes:
- Implement
DacDbiImpl.IsThreadSuspendedOrHijackedusingIThread.GetThreadData(...).State(DebugSyncSuspended | Hijacked). - Add a dump test that iterates threads from
ThreadStoreData.FirstThreadand asserts DBI == contract for suspended/hijacked.
Show a summary per file
| File | Description |
|---|---|
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs | Adds the contract-based implementation of IsThreadSuspendedOrHijacked (with DEBUG cross-check against legacy DAC when present). |
| src/native/managed/cdac/tests/DumpTests/DacDbi/DacDbiThreadDumpTests.cs | Adds a dump integration test to validate IsThreadSuspendedOrHijacked results against the Thread contract state. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 1
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
rcj1
approved these changes
Jul 23, 2026
max-charlamb
approved these changes
Jul 23, 2026
noahfalk
approved these changes
Jul 23, 2026
This was referenced Jul 23, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs:4185
- Avoid using an intentionally-thrown NullReferenceException for the null-output case. This is the only instance in this file that uses exceptions for E_POINTER, and it also makes the GetThreadData call less consistent with nearby thread helpers that explicitly wrap vmThread in a TargetPointer. Prefer setting hr directly when pResult is null, and use new TargetPointer(vmThread) for the contract call.
{
if (pResult is null)
throw new NullReferenceException();
*pResult = Interop.BOOL.FALSE;
noahfalk
enabled auto-merge (squash)
July 24, 2026 00:09
rcj1
approved these changes
Jul 24, 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.
Summary
Implement
IsThreadSuspendedOrHijackedfor cDAC.Changes
DacDbiImpl.cs- ImplementIsThreadSuspendedOrHijacked.DacDbiThreadDumpTests.cs- Add a test cross-validating the result against the thread contract.