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
Parse errors within INCLUDEd files leak file handles #5942
Comments
@sdlime, as @dmorissette said, can you add this onto your plate? I think this one is important. |
Yes, will try to find time this week. Update - time has been hard to find, hopefully this weekend. |
I have a pull request out there that aims to address this in master but it needs to be verified. @alexbrault, any chance you could take a look? I've tried with parse errors in the main map file, one include deep and two includes deep and the right code seems to be being called. --Steve |
Addresses open file handles when parse errors occur in include files (Issue #5942)
When the parser encounters an error, it immediately exits its loop, closes the current file and returns. If that happens while parsing a file included with the INCLUDE token, all the other files in the include stack are left open. This is especially a problem in MapScript since those files may not be reclaimed by the operating system until the parent process exits.
For example:
leaked.map:
parse_error.map:
The text was updated successfully, but these errors were encountered: