digitalmars.D.bugs - [Issue 14995] New: std.mmfile incorrectly handles errors in ctor
- via Digitalmars-d-bugs (19/19) Sep 01 2015 https://issues.dlang.org/show_bug.cgi?id=14995
https://issues.dlang.org/show_bug.cgi?id=14995 Issue ID: 14995 Summary: std.mmfile incorrectly handles errors in ctor Product: D Version: D2 Hardware: All OS: Linux Status: NEW Severity: normal Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: thecybershadow gmail.com If the MmFile ctor fails, it will often close the file but leave the fd field set. This will cause its destructor to later attempt to close it again, which will either cause an exception (which in turn will likely result in an InvalidMemoryOperationError), or close an unrelated file with the same coincidental fd. --
Sep 01 2015