[Issue 14995] New: std.mmfile incorrectly handles errors in ctor
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Sep 1 04:30:27 PDT 2015
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 at puremagic.com
Reporter: thecybershadow at 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.
--
More information about the Digitalmars-d-bugs
mailing list