Skip to content

Fix C++/CLI applications which use __declspec(appdomain) - #110367

Merged
davidwrighton merged 2 commits into
dotnet:mainfrom
davidwrighton:fix110365
Dec 6, 2024
Merged

Fix C++/CLI applications which use __declspec(appdomain)#110367
davidwrighton merged 2 commits into
dotnet:mainfrom
davidwrighton:fix110365

Conversation

@davidwrighton

Copy link
Copy Markdown
Member

Do not eagerly allocate static variable space while loading the assembly in use. This avoids possible recursive loading issues found in C++/CLI codebases. Repurpose the NativeCallingManaged test to subsume this particular regression test case.

Fix#110365

…bly in use. This avoids possible recursive loading issues found in C++/CLI codebases. Repurpose the NativeCallingManaged test to subsume this particular regression test case.
Fixdotnet#110365

@AaronRobinsonMSFTAaronRobinsonMSFT 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.

Repurposing this test makes sense to me. I have a question on the type loading sequence though.

Comment threadsrc/coreclr/vm/methodtable.cpp
@davidwrighton

Copy link
Copy Markdown
MemberAuthor

/backport to release/9.0-staging

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/12207714479

@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jan 6, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-AssemblyLoader-coreclronly use for closed issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C++/CLI __declspec(appdomain) static variables cause a C++/CLI binary to fail to load.

2 participants

@davidwrighton@AaronRobinsonMSFT