Skip to content

[release/11.0] Fix software EH memory leak on Unix - #135541

Merged
JulieLeeMSFT merged 1 commit into
dotnet:release/11.0from
janvorli:backport/135290-to-release-11.0
Oct 12, 2026
Merged

JulieLeeMSFT merged 1 commit into
dotnet:release/11.0from
janvorli:backport/135290-to-release-11.0

Conversation

@janvorli

@janvorli janvorli commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Backport of #135290 to release/11.0

/cc @janvorli

Customer Impact

There is a memory leak of CONTEXT and EXCEPTION_RECORD data structures on Unix (about 3400 bytes on amd64) when the DispatchManagedException for software managed exceptions thrown from native runtime code is executed. The managed exception handling is not taking ownership of the context and exception records in cases they were dynamically allocated.

Regression

Testing

Coreclr and libraries tests, directed test for the issue that was added with the fix

Risk

Low, it changes software exception handling to the same plan as was always there for hardware exception handling w.r.t. to the ownership of the contexts.

Backport of dotnet#135290, including dotnet/runtime@4d1b425 to skip the regression test where working-set monitoring is unsupported.

The CoreCLR change is adapted to the GCX_COOP scope used on release/11.0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9fe58a3a-d045-4e26-af87-9b85acdea60d
@janvorli janvorli added this to the 11.0.0 milestone Oct 9, 2026
@janvorli
janvorli requested a review from jkotas October 9, 2026 21:01
@janvorli janvorli self-assigned this Oct 9, 2026
@janvorli janvorli added Servicing-consider Issue for next servicing release review area-VM-coreclr labels Oct 9, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke
See info in area-owners.md if you want to be subscribed.

@JulieLeeMSFT

Copy link
Copy Markdown
Member

/ba-g known issues.

@JulieLeeMSFT JulieLeeMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 12, 2026
@JulieLeeMSFT
JulieLeeMSFT merged commit 056fd9d into dotnet:release/11.0 Oct 12, 2026
137 of 144 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-VM-coreclr Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants