From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A0C21158245 for ; Fri, 6 Dec 2024 23:12:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 27E9EE09A7; Fri, 6 Dec 2024 23:12:08 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9A85EE09B4 for ; Fri, 6 Dec 2024 23:12:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4D25A342FA3 for ; Fri, 6 Dec 2024 23:12:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C2E8A2191 for ; Fri, 6 Dec 2024 23:12:03 +0000 (UTC) From: "Conrad Kostecki" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" Message-ID: <1733526690.92328f4b82f4d1c6c48a6507ee5a81e13cbb660f.conikost@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-shells/bash/files/bash-5.2_p21-wpointer-to-int.patch app-shells/bash/files/bash-5.2_p26-memory-leaks.patch X-VCS-Directories: app-shells/bash/files/ X-VCS-Committer: conikost X-VCS-Committer-Name: Conrad Kostecki X-VCS-Revision: 92328f4b82f4d1c6c48a6507ee5a81e13cbb660f X-VCS-Branch: master Date: Fri, 6 Dec 2024 23:12:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 3cc12781-d98a-4601-b5a9-05f536b0c9aa X-Archives-Hash: 25b27ba6623f853c02eafcba59ff7ed1 commit: 92328f4b82f4d1c6c48a6507ee5a81e13cbb660f Author: Michael Mair-Keimberger levelnine at> AuthorDate: Mon Nov 25 19:40:16 2024 +0000 Commit: Conrad Kostecki gentoo org> CommitDate: Fri Dec 6 23:11:30 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92328f4b app-shells/bash: remove unused patches Signed-off-by: Michael Mair-Keimberger levelnine.at> Signed-off-by: Conrad Kostecki gentoo.org> .../bash/files/bash-5.2_p21-wpointer-to-int.patch | 13 -- .../bash/files/bash-5.2_p26-memory-leaks.patch | 136 --------------------- 2 files changed, 149 deletions(-) diff --git a/app-shells/bash/files/bash-5.2_p21-wpointer-to-int.patch b/app-shells/bash/files/bash-5.2_p21-wpointer-to-int.patch deleted file mode 100644 index 3d4abbc47f43..000000000000 --- a/app-shells/bash/files/bash-5.2_p21-wpointer-to-int.patch +++ /dev/null @@ -1,13 +0,0 @@ -https://lists.gnu.org/archive/html/bug-bash/2023-03/msg00116.html -https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=57d4dc15ff35895a1c1248f948f59739ffb99fde ---- lib/sh/random.c -+++ lib/sh/random.c -@@ -90,7 +90,7 @@ genseed () - u_bits32_t iv; - - gettimeofday (&tv, NULL); -- iv = (u_bits32_t)seedrand; /* let the compiler truncate */ -+ iv = (uintptr_t)seedrand; /* let the compiler truncate */ - iv = tv.tv_sec ^ tv.tv_usec ^ getpid () ^ getppid () ^ current_user.uid ^ iv; - return (iv); - } diff --git a/app-shells/bash/files/bash-5.2_p26-memory-leaks.patch b/app-shells/bash/files/bash-5.2_p26-memory-leaks.patch deleted file mode 100644 index 10a5deb18192..000000000000 --- a/app-shells/bash/files/bash-5.2_p26-memory-leaks.patch +++ /dev/null @@ -1,136 +0,0 @@ -https://lists.gnu.org/archive/html/bug-bash/2024-01/msg00036.html -https://lists.gnu.org/archive/html/bug-bash/2024-01/txtm8yNNPR9RQ.txt - -For evalstring.c: -* https://lists.gnu.org/archive/html/bug-bash/2024-01/msg00011.html -* https://git.savannah.gnu.org/cgit/bash.git/diff/builtins/evalstring.c?h=devel&id=81f7b44564cd1510788035cea7c59631865a7db2&dt=1#n766 - -From 711ab85262884f2b91f09eceb9aefd0e2426ce67 Mon Sep 17 00:00:00 2001 -From: Grisha Levit -Date: Sat, 3 Jun 2023 16:51:26 -0400 -Subject: [PATCH] various leaks - -Found mostly by normal usage running a no-bash-malloc build with clang's -LeakSanitizer enabled. So far seems to provide very accurate results. - -* arrayfunc.c -- quote_compound_array_word: make sure to free VALUE -- bind_assoc_var_internal: if assigning to a dynamic variable, make sure - to free the key (usually assoc_insert would do it) - -* bashline.c -- bash_command_name_stat_hook: free original *NAME if we are going to - change what it points to (what the callers seem to expect) - -* builtins/evalstring.c -- parse_and_execute: make sure to dispose of the parsed command - resulting from a failed function import attempt -- open_redir_file: if we did not get a pointer to pass back the expanded - filename, make sure to free the name - -* examples/loadables/stat.c -- loadstat: bind_assoc_variable does not free its VALUE argument so make - sure to do it - -* subst.c -- param_expand: free temp1 value for codepaths that don't do it ---- - arrayfunc.c | 6 +++++- - bashline.c | 1 + - builtins/evalstring.c | 4 ++++ - examples/loadables/stat.c | 1 + - subst.c | 2 ++ - 5 files changed, 13 insertions(+), 1 deletion(-) - -diff --git a/arrayfunc.c b/arrayfunc.c -index 2c05d15b..8ba64084 100644 ---- arrayfunc.c -+++ arrayfunc.c -@@ -208,7 +208,10 @@ bind_assoc_var_internal (entry, hash, key, value, flags) - newval = make_array_variable_value (entry, 0, key, value, flags); - - if (entry->assign_func) -- (*entry->assign_func) (entry, newval, 0, key); -+ { -+ (*entry->assign_func) (entry, newval, 0, key); -+ FREE (key); -+ } - else - assoc_insert (hash, key, newval); - -@@ -985,6 +988,7 @@ quote_compound_array_word (w, type) - if (t != w+ind) - free (t); - strcpy (nword + i, value); -+ free (value); - - return nword; - } -diff --git a/bashline.c b/bashline.c -index c85b05b6..bd7548cc 100644 ---- bashline.c -+++ bashline.c -@@ -1928,6 +1928,7 @@ bash_command_name_stat_hook (name) - result = search_for_command (cname, 0); - if (result) - { -+ FREE (*name); - *name = result; - return 1; - } -diff --git a/builtins/evalstring.c b/builtins/evalstring.c -index df3dd68e..20c6a4a7 100644 ---- builtins/evalstring.c -+++ builtins/evalstring.c -@@ -461,6 +461,8 @@ parse_and_execute (string, from_file, flags) - should_jump_to_top_level = 0; - last_result = last_command_exit_value = EX_BADUSAGE; - set_pipestatus_from_exit (last_command_exit_value); -+ dispose_command(command); -+ global_command = (COMMAND *)NULL; - reset_parser (); - break; - } -@@ -762,6 +764,8 @@ open_redir_file (r, fnp) - - if (fnp) - *fnp = fn; -+ else -+ free (fn); - return fd; - } - -diff --git a/examples/loadables/stat.c b/examples/loadables/stat.c -index 1e60e7b6..ed5c9764 100644 ---- examples/loadables/stat.c -+++ examples/loadables/stat.c -@@ -349,6 +349,7 @@ loadstat (vname, var, fname, flags, fmt, sp) - key = savestring (arraysubs[i]); - value = statval (i, fname, flags, fmt, sp); - v = bind_assoc_variable (var, vname, key, value, ASS_FORCE); -+ free (value); - } - return 0; - } -diff --git a/subst.c b/subst.c -index 1ac6eb2d..ff0602da 100644 ---- subst.c -+++ subst.c -@@ -10727,6 +10727,7 @@ comsub: - { - chk_atstar (temp, quoted, pflags, quoted_dollar_at_p, contains_dollar_at); - tdesc = parameter_brace_expand_word (temp, SPECIAL_VAR (temp, 0), quoted, pflags, 0); -+ free (temp1); - if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal) - return (tdesc); - ret = tdesc; -@@ -10739,6 +10740,7 @@ comsub: - { - set_exit_status (EXECUTION_FAILURE); - report_error (_("%s: invalid variable name for name reference"), temp); -+ free (temp1); - return (&expand_wdesc_error); /* XXX */ - } - else --- -2.43.0