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

Harden metadata handler invoker against bad metadata #47433

Open
wants to merge 1 commit into
base: release/9.0.3xx
Choose a base branch
from

Conversation

tmat
Copy link
Member

@tmat tmat commented Mar 11, 2025

No description provided.

@Copilot Copilot bot review requested due to automatic review settings March 11, 2025 00:41
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Mar 11, 2025
Copy link
Contributor

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

PR Overview

This PR strengthens the robustness of the MetadataUpdateHandlerInvoker by gracefully handling cases where assembly metadata retrieval might fail.

  • Introduces try-catch blocks around GetName() and GetReferencedAssemblies() calls.
  • Returns early or assigns default values when metadata access fails.

Reviewed Changes

File Description
src/BuiltInTools/HotReloadAgent/MetadataUpdateHandlerInvoker.cs Added error handling to protect against exceptions when reading assembly metadata

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

@tmat
Copy link
Member Author

tmat commented Mar 11, 2025

@phil-allen-msft ptal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant