diff options
| author | LemonBoy <thatlemon@gmail.com> | 2020-09-01 18:48:43 +0200 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2020-09-02 11:11:57 +0200 |
| commit | 73a8c9beaa63c48b6ddaeec8d2a67b239f0dec92 (patch) | |
| tree | 38e42ddabbcb8c6306d7f225154d26d3db1f58d9 /src-self-hosted/stage2.zig | |
| parent | 26140678a5c72604f2baac3cb9d1e5f7b37b6b8d (diff) | |
| download | zig-73a8c9beaa63c48b6ddaeec8d2a67b239f0dec92.tar.gz zig-73a8c9beaa63c48b6ddaeec8d2a67b239f0dec92.zip | |
std: Don't trust stat() size in readAllAlloc fns
Some files such as the ones in /proc report a st_size of zero, try to
read the file anyway if we hit that case.
Diffstat (limited to 'src-self-hosted/stage2.zig')
| -rw-r--r-- | src-self-hosted/stage2.zig | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src-self-hosted/stage2.zig b/src-self-hosted/stage2.zig index 30d2ea44db..45b8ad3073 100644 --- a/src-self-hosted/stage2.zig +++ b/src-self-hosted/stage2.zig @@ -615,7 +615,6 @@ export fn stage2_libc_parse(stage1_libc: *Stage2LibCInstallation, libc_file_z: [ error.NotOpenForWriting => unreachable, error.NotOpenForReading => unreachable, error.Unexpected => return .Unexpected, - error.EndOfStream => return .EndOfFile, error.IsDir => return .IsDir, error.ConnectionResetByPeer => unreachable, error.ConnectionTimedOut => unreachable, |
