-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fixes trying to create a module using a trash as the address of the module #119031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 bug where trash values in vmModule could cause incorrect module creation during debugging operations. The issue was introduced in a previous PR that simplified module lookup logic but inadvertently allowed uninitialized vmModule values to be used as valid addresses.
- Explicitly sets
vmModuleto NULL to prevent using uninitialized/trash values - Prevents creation of spurious modules with invalid addresses in the debugger
tommcdon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
|
/backport to release/10.0 |
|
Started backporting to release/10.0: https://github.com/dotnet/runtime/actions/runs/17209922808 |
In this PR #118414, this code was changed:
FROM:
pModule = m_modules.GetBase(vmDomainAssembly.IsNull() ? VmPtrToCookie(vmModule) : mPtrToCookie(vmDomainAssembly));TO:
pModule = m_modules.GetBase(VmPtrToCookie(vmModule));But vmModule can contain trash value so it will not find a module in m_module and this will make it try to create a new module using this trash address in the CordbModule constructor.
I don't know if this needs to be fixed in other places, but this place for sure is causing issues. Not sure how it was not detected on other platforms, I detected it on android.