Bug 18987 – Reading from unreadable file produces incorrect exception

Status
NEW
Severity
minor
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2018-06-15T00:56:17Z
Last change time
2024-12-01T16:33:56Z
Assigned to
No Owner
Creator
elpenguino+D
Moved to GitHub: phobos#10341 →

Comments

Comment #0 by elpenguino+D — 2018-06-15T00:56:17Z
Attempting to read from a file opened only for writing on Windows (10, build 17134, 64-bit) results in at least one ErrnoException carrying a "No error" message. Example: ``` import std.stdio; void main() { auto x = File("hi", "w"); ubyte[100] buf; x.rawRead(buf); } ``` results in one "No error" ErrnoException when compiled with -m64 and -m32mscoff, and two when compiled with -m32. The second one is thrown upon closing the file.
Comment #1 by robert.schadek — 2024-12-01T16:33:56Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10341 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB