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

Open
jaredpar opened this issue Sep 25, 2024 · 0 comments · May be fixed by #75293
Open

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

jaredpar opened this issue Sep 25, 2024 · 0 comments · May be fixed by #75293
Assignees
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead
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
@jjonescz jjonescz linked a pull request Sep 30, 2024 that will close this issue
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants