Fix CORDBG_E_MODULE_NOT_LOADED error in func-eval#121057
Conversation
There was a problem hiding this comment.
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
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
|
/backport to release/10.0 |
|
Started backporting to |
|
@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. |
…1087) Backport of #121057 to release/10.0 /cc @hoyosjs @tommcdon ## Customer Impact - [ ] Customer reported - [x] Found internally Regression found by Visual Studio debugger testing found in .NET 10 RC2 ## Regression - [x] Yes - [ ] No #118414 exposed latent variable initialization issue in debugger ## Testing Found by Visual Studio debugger testing ## Risk Low - the fix is to zero initialize a variable that is used by the debugger Co-authored-by: Tom McDonald <tommcdon@microsoft.com>
Correctly initialize vmModule in FuncEvalComplete in the debugger
Fixes #120848