diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-09-14 11:10:11 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-09-14 11:10:11 +0100 |
commit | 81b8f20732954c4508baf2f77472b5435e3f851f (patch) | |
tree | 4180177cb7ba85eab50159ce96218c2419fb24a6 /dev-lang/zig-bin/files | |
parent | 946859e0e36904cffb3e0ccbccb6b7b1347c1cc8 (diff) |
gentoo auto-resync : 14:09:2022 - 11:10:10
Diffstat (limited to 'dev-lang/zig-bin/files')
-rw-r--r-- | dev-lang/zig-bin/files/zig-bin-0.9.1-fix-bad-hostname-segfault.patch | 26 | ||||
-rw-r--r-- | dev-lang/zig-bin/files/zig-bin-0.9.1-fix-detecting-abi.patch | 19 |
2 files changed, 26 insertions, 19 deletions
diff --git a/dev-lang/zig-bin/files/zig-bin-0.9.1-fix-bad-hostname-segfault.patch b/dev-lang/zig-bin/files/zig-bin-0.9.1-fix-bad-hostname-segfault.patch new file mode 100644 index 000000000000..2e87ecc6d6ee --- /dev/null +++ b/dev-lang/zig-bin/files/zig-bin-0.9.1-fix-bad-hostname-segfault.patch @@ -0,0 +1,26 @@ +https://github.com/ziglang/zig/commit/601d8f721d6dc90ac390bf5ecc7d8bafdd6a30d8 +Bug https://bugs.gentoo.org/829959 + +From 601d8f721d6dc90ac390bf5ecc7d8bafdd6a30d8 Mon Sep 17 00:00:00 2001 +From: Veikka Touminen <git@vexu.eu> +Date: Sun, 10 Jul 2022 04:27:23 -0600 +Subject: [PATCH] std.net.getAddressList: fix segfault on bad hostname + +Fixes #12065 +--- + lib/std/net.zig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/std/net.zig b/lib/std/net.zig +index 235ad8496a1..c381df9bce7 100644 +--- a/lib/std/net.zig ++++ b/lib/std/net.zig +@@ -731,7 +731,7 @@ pub fn getAddressList(allocator: mem.Allocator, name: []const u8, port: u16) !*A + break :blk result; + }; + const arena = result.arena.allocator(); +- errdefer result.arena.deinit(); ++ errdefer result.deinit(); + + if (builtin.target.os.tag == .windows or builtin.link_libc) { + const name_c = try std.cstr.addNullByte(allocator, name); diff --git a/dev-lang/zig-bin/files/zig-bin-0.9.1-fix-detecting-abi.patch b/dev-lang/zig-bin/files/zig-bin-0.9.1-fix-detecting-abi.patch deleted file mode 100644 index 6aa2f49b379a..000000000000 --- a/dev-lang/zig-bin/files/zig-bin-0.9.1-fix-detecting-abi.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Eric Joldasov <bratishkaerik@getgoogleoff.me> - -Upstream parses /usr/bin/env ELF file for detecting C ABI and the dynamic linker. -However, if sys-apps/coreutils was merged with "multicall" USE flag, it would be a script and not a ELF file. -This will raise error.UnexpectedEndOfFile, and Zig will fallback to default dynamic linker (i.e. musl), -which breaks building programs with Zig on glibc systems. This patch changes file from -/usr/bin/env to /bin/bash, because it is more reliable on Gentoo systems. - ---- a/lib/std/zig/system/NativeTargetInfo.zig -+++ b/lib/std/zig/system/NativeTargetInfo.zig -@@ -355,7 +355,7 @@ fn detectAbiAndDynamicLinker( - return result; - } - -- const env_file = std.fs.openFileAbsoluteZ("/usr/bin/env", .{}) catch |err| switch (err) { -+ const env_file = std.fs.openFileAbsoluteZ("/bin/bash", .{}) catch |err| switch (err) { - error.NoSpaceLeft => unreachable, - error.NameTooLong => unreachable, - error.PathAlreadyExists => unreachable, |