Skip to content
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

Fix a set of minor DAC bugs I encountered recently #100031

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

davidwrighton
Copy link
Member

In src/coreclr/debug/daccess/dacdbiimpl.cpp

  • If g_pDebugger is NULL, produce an error, or NULL result instead of an invalid memory access.
  • This caused problems when debugging with a debug version of the DAC

In src/coreclr/debug/di/module.cpp

  • Avoid attempting to get the MapAddr if the number of entries in the map is 0, as it may not yet be fully initialized and attempting to call the GetMapAddr function may cause an ASSERT in debug/checked versions of the DAC

In src/coreclr/utilcode/collections.cpp

  • If a CHashTable is not fully initialized, or is in an intermediate state, its possible for the linked list to have an infinite cycle. Tweak the iteration here under the DAC to stop
    • This is known to cause stack walking to loop infinitely in the debugger when debugging a runtime which has suspended at a non-safe point

In src/coreclr/debug/daccess/dacdbiimpl.cpp
- If g_pDebugger is NULL, produce an error, or NULL result instead of an invalid memory access.
- This caused problems when debugging with a debug version of the DAC

In src/coreclr/debug/di/module.cpp
- Avoid attempting to get the MapAddr if the number of entries in the map is 0, as it may not yet be fully initialized and attempting to call the GetMapAddr function may cause an ASSERT in debug/checked versions of the DAC

In src/coreclr/utilcode/collections.cpp
- If a CHashTable is not fully initialized, or is in an intermediate state, its possible for the linked list to have an infinite cycle. Tweak the iteration here under the DAC to stop
  - This is  known to cause stack walking to loop infinitely in the debugger when debugging a runtime which has suspended at a non-safe point
Copy link
Contributor

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

@davidwrighton davidwrighton merged commit 5e8edc8 into dotnet:main Mar 21, 2024
88 of 90 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 21, 2024
@davidwrighton
Copy link
Member Author

/backport to release/8.0-staging

@github-actions github-actions bot unlocked this conversation Jul 15, 2024
Copy link
Contributor

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

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants