Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[cDAC] Remove EnumerateMonitorEventWaitList implementation from DAC and cDAC - #129054

#129054
Merged
barosiak merged 3 commits into
dotnet:maindotnet/runtime:mainfrom
barosiak:barosiak/EnumerateMonitorEventWaitListbarosiak/runtime:barosiak/EnumerateMonitorEventWaitListCopy head branch name to clipboard
Jun 10, 2026
Merged

[cDAC] Remove EnumerateMonitorEventWaitList implementation from DAC and cDAC#129054
barosiak merged 3 commits into
dotnet:maindotnet/runtime:mainfrom
barosiak:barosiak/EnumerateMonitorEventWaitListbarosiak/runtime:barosiak/EnumerateMonitorEventWaitListCopy head branch name to clipboard

Conversation

@barosiak

@barosiak barosiak commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

Return E_NOTIMPL from EnumerateMonitorEventWaitList in both DAC and cDAC. The underlying waiter-to-thread mapping via Condition.t_waiterForCurrentThread was broken (the field is cleared during Condition.Wait), and no current consumers are believed to call this API.
Per this review comment

Changes

  • dacdbiimpl.cpp - Replace EnumerateMonitorEventWaitList body with return E_NOTIMPL
  • DacDbiImpl.cs - Replace legacy fallback delegation with HResults.E_NOTIMPL

@barosiak barosiak self-assigned this Jun 5, 2026
Copilot AI review requested due to automatic review settings June 5, 2026 21:48
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements DacDbiImpl.EnumerateMonitorEventWaitList in the cDAC managed DacDbiImpl to enumerate threads waiting on a monitor’s condition wait list for a given object, and adds unit tests exercising key scenarios across architectures.

Changes:

  • Added a cDAC implementation of EnumerateMonitorEventWaitList that reads the Monitor.s_conditionTable, resolves the object’s Condition via ConditionalWeakTable, maps per-thread waiter objects to threads, then walks the waiters linked list to invoke the callback.
  • Added #if DEBUG validation comparing cDAC results against legacy DAC results.
  • Added unit tests covering: no sync block, null callback, missing condition / empty waiters list, and single/multiple/non-waiting thread cases.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs Adds the cDAC implementation of EnumerateMonitorEventWaitList plus DEBUG-only legacy cross-validation.
src/native/managed/cdac/tests/UnitTests/DacDbiImplTests.cs Adds helper infrastructure and new tests for EnumerateMonitorEventWaitList behavior across architectures.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 5, 2026 22:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread src/native/managed/cdac/tests/UnitTests/DacDbiImplTests.cs Outdated

@noahfalk noahfalk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the DAC code this was reproducing is broken and its unlikely anyone is calling the method. I'd recommend we return E_NOTIMPL rather than fix it.

@barosiak

Copy link
Copy Markdown
Member Author

/ba-g unrelated failures

@barosiak
barosiak merged commit 4b56149 into dotnet:main Jun 10, 2026
129 of 131 checks passed
BoyBaykiller pushed a commit to BoyBaykiller/runtime that referenced this pull request Jun 11, 2026
…nd cDAC (dotnet#129054)

### Summary
Return `E_NOTIMPL` from `EnumerateMonitorEventWaitList` in both DAC and
cDAC. The underlying waiter-to-thread mapping via
`Condition.t_waiterForCurrentThread` was broken (the field is cleared
during `Condition.Wait`), and no current consumers are believed to call
this API.
Per [this review
comment](dotnet#129054 (comment))

### Changes
- `dacdbiimpl.cpp` - Replace `EnumerateMonitorEventWaitList` body with
`return E_NOTIMPL`
- `DacDbiImpl.cs` - Replace legacy fallback delegation with
`HResults.E_NOTIMPL`

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview6 milestone Jun 17, 2026
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
…nd cDAC (#129054)

### Summary
Return `E_NOTIMPL` from `EnumerateMonitorEventWaitList` in both DAC and
cDAC. The underlying waiter-to-thread mapping via
`Condition.t_waiterForCurrentThread` was broken (the field is cleared
during `Condition.Wait`), and no current consumers are believed to call
this API.
Per [this review
comment](#129054 (comment))

### Changes
- `dacdbiimpl.cpp` - Replace `EnumerateMonitorEventWaitList` body with
`return E_NOTIMPL`
- `DacDbiImpl.cs` - Replace legacy fallback delegation with
`HResults.E_NOTIMPL`

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.