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

PDBWriter: replace Assert with LogError #28

Conversation

xavierpinho
Copy link
Collaborator

Noticed it was crashing when processing https://www.nuget.org/packages/System.Security.Principal.Windows, although exclusively on this file:

system.security.principal.windows/5.0.0/runtimes/win/lib/netstandard1.3/System.Security.Principal.Windows.dll

Since the remaining files are OK, figured we should at least start by not crashing the entire process.

@@ -402,7 +393,7 @@ string BuildFileNameFromTypeName(TypeDefinitionHandle handle)
var method = function.MoveNextMethod ?? function.Method;
var methodHandle = (MethodDefinitionHandle)method!.MetadataToken;
sequencePoints.TryGetValue(function, out var points);
ProcessMethod(methodHandle, document, points, syntaxTree);
ProcessMethod(methodHandle, document, points, file.FileName);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

syntaxTree was unused. Replaced it with FileName for logging purposes.

@xavierpinho
Copy link
Collaborator Author

cc'ing @DavidBakerEffendi, @AndreiDreyer, since I can't add reviewers.

@DavidBakerEffendi DavidBakerEffendi merged commit 77091f6 into joernio:main Dec 16, 2024
1 check passed
@xavierpinho xavierpinho deleted the xavierp/replace-assert-with-logerror branch December 16, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants