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

Improve error reporting when reading bad metadata during EnC #75304

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

tmat
Copy link
Member

@tmat tmat commented Sep 30, 2024

Helps diagnosing issues like #65176

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Sep 30, 2024
@tmat tmat changed the title Enc debug info reader Improve error reporting when reading bad metadata during EnC Sep 30, 2024
@tmat tmat marked this pull request as ready for review October 1, 2024 01:30
@tmat tmat requested a review from a team as a code owner October 1, 2024 01:30
@tmat
Copy link
Member Author

tmat commented Oct 1, 2024

@davidwengier @dotnet/roslyn-compiler ptal

@@ -690,7 +692,7 @@ static ImmutableArray<string> getHoistedVariableNames(ImmutableArray<ISymbolInte
{
provider = Baseline.DebugInformationProvider(MetadataTokens.MethodDefinitionHandle(methodRowId));
}
catch (Exception e) when (e is InvalidDataException or IOException)
catch (Exception e) when (e is InvalidDataException or IOException or BadImageFormatException)
Copy link
Contributor

Choose a reason for hiding this comment

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

catch (Exception e) when (e is InvalidDataException or IOException or BadImageFormatException)

We don't want to report anything for this catch?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not a critical error. If a method is deleted and its body is not updated to throw an exception it would execute the original IL. Perhaps we could add a new warning but I don't think it's worth the effort.

Copy link
Contributor

@AlekseyTs AlekseyTs left a comment

Choose a reason for hiding this comment

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

LGTM (commit 1)

@tmat
Copy link
Member Author

tmat commented Oct 1, 2024

@jaredpar @cston @jjonescz for 2nd review.

@tmat tmat merged commit 3caa5ac into dotnet:main Oct 1, 2024
28 checks passed
@tmat tmat deleted the EncDebugInfoReader branch October 1, 2024 22:22
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Oct 1, 2024
@akhera99 akhera99 modified the milestones: Next, 17.13 P1 Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants