8000 go/loader: close files on early errors by dajiaohuang · Pull Request #1762 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content

go/loader: close files on early errors - #1762

Open
dajiaohuang wants to merge 1 commit into
dominikh:masterfrom
dajiaohuang:fix/loader-close-open-files
Open

dajiaohuang wants to merge 1 commit into
dominikh:masterfrom
dajiaohuang:fix/loader-close-open-files

Conversation

@dajiaohuang
@dajiaohuang dajiaohuang commented Oct 1, 2026 •
Copy link
Copy Markdown

The compiled source file opened in loader.LoadPackage remained open when Stat failed or when the size limit was exceeded. Close the file before returning from both early-error paths.

Validation: go test ./go/loader compiled successfully; the package has no tests.

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.

1 participant

0