From c6538b70f5f0a5a1da8895c169c2cb9189148d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Fri, 30 Jan 2026 23:58:47 +0100 Subject: [PATCH 1/3] llvm: handle packed structs in C ABI integer promotion --- src/codegen/llvm.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index 358d4ac469..26369d2ce9 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -12608,8 +12608,7 @@ fn ccAbiPromoteInt(cc: std.builtin.CallingConvention, zcu: *Zcu, ty: Type) ?std. } const int_info = switch (ty.zigTypeTag(zcu)) { .bool => Type.u1.intInfo(zcu), - .int, .@"enum", .error_set => ty.intInfo(zcu), - else => return null, + else => if (ty.isAbiInt(zcu)) ty.intInfo(zcu) else return null, }; return switch (target.os.tag) { .driverkit, .ios, .maccatalyst, .macos, .watchos, .tvos, .visionos => switch (int_info.bits) { From cbe38f771c0cb7d098878e8e703ed23620f868f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Fri, 30 Jan 2026 23:58:17 +0100 Subject: [PATCH 2/3] std.Io.Threaded: consider EOPNOTSUPP to be programmer error in createFileMap() Not doing so was hiding bugs (e.g. on s390x-linux). --- lib/std/Io/Threaded.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/std/Io/Threaded.zig b/lib/std/Io/Threaded.zig index f0562504fd..918b0f43f9 100644 --- a/lib/std/Io/Threaded.zig +++ b/lib/std/Io/Threaded.zig @@ -16796,6 +16796,7 @@ fn createFileMap( .OVERFLOW => return error.Unseekable, .BADF => return errnoBug(err), // Always a race condition. .INVAL => return errnoBug(err), // Invalid parameters to mmap() + .OPNOTSUPP => return errnoBug(err), // Bad flags with MAP.SHARED_VALIDATE on Linux. else => return posix.unexpectedErrno(err), } }; From 7c68ab1d1085925ec33dc0f8a6695006b2d7a85d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Fri, 30 Jan 2026 23:47:42 +0100 Subject: [PATCH 3/3] std.os.linux: add MAP.DROPPABLE Introduced in Linux 6.11. --- lib/std/os/linux.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index f5868f71e9..501ba44557 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -146,6 +146,7 @@ pub const MAP_TYPE = enum(u4) { SHARED = 0x01, PRIVATE = 0x02, SHARED_VALIDATE = 0x03, + DROPPABLE = 0x08, }; pub const MAP = switch (native_arch) {