| author | |
| committer | |
| log | 7b1502f327f580254f5699754ec21521eac10cc7 |
| tree | d6371f58f0830aeb27c18b4418e5d69fdd3b92b4 |
| parent | f14c4c3db88b6194205369312d0e616c793c5e47 |
2 files changed, 5 insertions(+), 9 deletions(-)
lib/compiler/libc.zig+5-1| ... | @@ -29,6 +29,10 @@ pub fn main() !void { | ... | @@ -29,6 +29,10 @@ pub fn main() !void { |
| 29 | const arena = arena_instance.allocator(); | 29 | const arena = arena_instance.allocator(); |
| 30 | const gpa = arena; | 30 | const gpa = arena; |
| 31 | 31 | ||
| 32 | var threaded: std.Io.Threaded = .init(gpa); | ||
| 33 | defer threaded.deinit(); | ||
| 34 | const io = threaded.io(); | ||
| 35 | |||
| 32 | const args = try std.process.argsAlloc(arena); | 36 | const args = try std.process.argsAlloc(arena); |
| 33 | const zig_lib_directory = args[1]; | 37 | const zig_lib_directory = args[1]; |
| 34 | 38 | ||
| ... | @@ -66,7 +70,7 @@ pub fn main() !void { | ... | @@ -66,7 +70,7 @@ pub fn main() !void { |
| 66 | const target_query = std.zig.parseTargetQueryOrReportFatalError(gpa, .{ | 70 | const target_query = std.zig.parseTargetQueryOrReportFatalError(gpa, .{ |
| 67 | .arch_os_abi = target_arch_os_abi, | 71 | .arch_os_abi = target_arch_os_abi, |
| 68 | }); | 72 | }); |
| 69 | const target = std.zig.resolveTargetQueryOrFatal(target_query); | 73 | const target = std.zig.resolveTargetQueryOrFatal(io, target_query); |
| 70 | 74 | ||
| 71 | if (print_includes) { | 75 | if (print_includes) { |
| 72 | const libc_installation: ?*LibCInstallation = libc: { | 76 | const libc_installation: ?*LibCInstallation = libc: { |
lib/std/fs/test.zig-8| ... | @@ -1433,14 +1433,6 @@ test "setEndPos" { | ... | @@ -1433,14 +1433,6 @@ test "setEndPos" { |
| 1433 | try testing.expectEqual(0, try f.getEndPos()); | 1433 | try testing.expectEqual(0, try f.getEndPos()); |
| 1434 | try reader.seekTo(0); | 1434 | try reader.seekTo(0); |
| 1435 | try testing.expectEqual(0, try reader.interface.readSliceShort(&buffer)); | 1435 | try testing.expectEqual(0, try reader.interface.readSliceShort(&buffer)); |
| 1436 | |||
| 1437 | // Invalid file length should error gracefully. Actual limit is host | ||
| 1438 | // and file-system dependent, but 1PB should fail on filesystems like | ||
| 1439 | // EXT4 and NTFS. But XFS or Btrfs support up to 8EiB files. | ||
| 1440 | try testing.expectError(error.FileTooBig, f.setEndPos(0x4_0000_0000_0000)); | ||
| 1441 | try testing.expectError(error.FileTooBig, f.setEndPos(std.math.maxInt(u63))); | ||
| 1442 | try testing.expectError(error.FileTooBig, f.setEndPos(std.math.maxInt(u63) + 1)); | ||
| 1443 | try testing.expectError(error.FileTooBig, f.setEndPos(std.math.maxInt(u64))); | ||
| 1444 | } | 1436 | } |
| 1445 | 1437 | ||
| 1446 | test "access file" { | 1438 | test "access file" { |