Implement remaining requested changes
- Replace @intCast with a checked version (std/debug.zig) - Replace @intCast with i64() when casting from a smaller type (std/fs/file.zig) - Replace `nakedcc` with appropriate calling convention for linking with c (std/os/linux/arm-eabi.zig) - Only check if hwcap contains TLS when the hwcap field actually exists (std/os/linux/tls.zig)
This commit is contained in:
@@ -1053,7 +1053,8 @@ fn openSelfDebugInfoPosix(allocator: *mem.Allocator) !DwarfInfo {
|
||||
S.self_exe_file = try fs.openSelfExe();
|
||||
errdefer S.self_exe_file.close();
|
||||
|
||||
const self_exe_mmap_len = mem.alignForward(@intCast(usize, try S.self_exe_file.getEndPos()), mem.page_size);
|
||||
const self_exe_len = math.cast(usize, try S.self_exe_file.getEndPos()) catch return error.DebugInfoTooLarge;
|
||||
const self_exe_mmap_len = mem.alignForward(self_exe_len, mem.page_size);
|
||||
const self_exe_mmap = try os.mmap(
|
||||
null,
|
||||
self_exe_mmap_len,
|
||||
|
||||
Reference in New Issue
Block a user