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

Compiler should error when it hits native PDB writer limits #75237

Closed
jaredpar opened this issue Sep 25, 2024 · 0 comments · Fixed by #75293
Closed

Compiler should error when it hits native PDB writer limits #75237

jaredpar opened this issue Sep 25, 2024 · 0 comments · Fixed by #75293
Assignees
Labels
4 - In Review A fix for the issue is submitted for review. Area-Compilers
Milestone

Comments

@jaredpar
Copy link
Member

The native PDB writer has a size limit of 0x10000 for calls to ISymUnmanagedWriter::SetSymAttribute. The writer does not enforce this limit on calls to SetSymAttribute but rather in CloseMethod where it returns E_OUTOFMEMORY. That leads to us emitting errors like

error CS0041: Unexpected error writing debug information -- 'Insufficient memory to continue the execution of the program'

That is very difficult for customers and us to debug. To help with root causing these problems we should emit a better error in the compiler when we hit this limit. Specifically the error should take into account the 0x10000 limit and issue an error message that includes the name of the method that was being emitted when the limit was hit.

This has come up two times now: #73447 and an internal feedback ticket. Having this better error would've saved us significant time in tracking down the problem.

@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 25, 2024
@jaredpar jaredpar added this to the 17.13 milestone Sep 25, 2024
@jcouv jcouv added 4 - In Review A fix for the issue is submitted for review. and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - In Review A fix for the issue is submitted for review. Area-Compilers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants