Skip to content

[pull] main from dotnet:main#1336

Merged
pull[bot] merged 2 commits into
All-Blockchains:mainfrom
dotnet:main
Mar 7, 2026
Merged

[pull] main from dotnet:main#1336
pull[bot] merged 2 commits into
All-Blockchains:mainfrom
dotnet:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Mar 7, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

max-charlamb and others added 2 commits March 6, 2026 12:22
## Summary

Matching PR for dotnet/runtime#125231, which fixes
`DefaultCOMImpl::Release()` reference counting bugs in the DAC.

### Changes

**1. Fix `SOSMethodEnum` simulator COM ref counting** (`util.cpp`)

The `SOSDacInterface15` simulator's `GetMethodTableSlotEnumerator` had
the same bug pattern fixed in the runtime PR — raw pointer assignment
without `QueryInterface`, and the null check occurred after the
dereference. Fixed to:
- Initialize `refCount` to 0 (matching `DefaultCOMImpl` convention)
- Use `QueryInterface` to return the interface, properly calling
`AddRef`
- Check for null before dereferencing the out parameter
- Use `delete` on failure (since `QueryInterface` wasn't called at
refCount 0)

**2. Fix `ISOSMethodEnum` leak in `strike.cpp`**

Changed raw `ISOSMethodEnum*` to `ToRelease<ISOSMethodEnum>` so
`Release()` is called when the pointer goes out of scope, matching the
pattern used everywhere else (e.g., `ToRelease<ISOSHandleEnum>`).

Co-authored-by: Max Charlamb <maxcharlamb@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
On Linux, the in-framework Console.CursorVisible getter always throws
PlatformNotSupportedException while the setter works via ANSI escape
codes. The collect-linux command was reading Console.CursorVisible to
save and restore cursor state, which caused an unhandled exception on
every invocation. Since the tests were mocking console, nothing got
caught.

The getter is unsupported on Linux (the only platform collect-linux runs
on) - the most sensible thing was to remove the read entirely and always
restore cursor visibility to true on exit.
@pull pull Bot locked and limited conversation to collaborators Mar 7, 2026
@pull pull Bot added the ⤵️ pull label Mar 7, 2026
@pull pull Bot merged commit 18cf9d1 into All-Blockchains:main Mar 7, 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.

2 participants