Skip to content

Conversation

@tommcdon
Copy link
Member

Correctly initialize vmModule in FuncEvalComplete in the debugger
Fixes #120848

@tommcdon tommcdon added this to the 11.0.0 milestone Oct 24, 2025
@tommcdon tommcdon self-assigned this Oct 24, 2025
Copilot AI review requested due to automatic review settings October 24, 2025 03:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a CORDBG_E_MODULE_NOT_LOADED error in the debugger's function evaluation by ensuring the vmModule field is properly initialized to NULL in TypeHandleToBasicTypeInfo. The fix addresses issue #120848 where uninitialized vmModule pointers could cause errors during debugging operations.

Key changes:

  • Added initialization of res->vmModule.SetRawPtr(NULL) in three code paths within the switch statement

@dotnet-policy-service
Copy link
Contributor

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

@hoyosjs hoyosjs merged commit 26b8e5d into dotnet:main Oct 25, 2025
98 checks passed
@hoyosjs
Copy link
Member

hoyosjs commented Oct 25, 2025

/backport to release/10.0

@github-actions
Copy link
Contributor

Started backporting to release/10.0 (link to workflow run)

@AaronRobinsonMSFT
Copy link
Member

@tommcdon Was this a long standing issue or was this introduced with a new feature/PR?

@tommcdon
Copy link
Member Author

tommcdon commented Oct 27, 2025

@tommcdon Was this a long standing issue or was this introduced with a new feature/PR?

@AaronRobinsonMSFT #118414 exposed a latent issue where we didn't zero init the debugger reponse for func-eval. t's access non-initialized memory and so the value is random. On x86 this seems to happen relatively consistently in the test case we used to investigate. While the issue was found on x86 func-eval testing, the issue could happen on any architecture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET 10 rc2: ICorDebugEval.NewParameterizedArray fails on win-x86

5 participants