commit:     d3feed6f35091e1269b51b59ecb1c406dc497e5d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 26 01:20:33 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 26 01:20:33 2024 +0000
URL:        
https://gitweb.gentoo.org/proj/toolchain/binutils-patches.git/commit/?id=d3feed6f

9999: add more more macro reverts

Bug: https://sourceware.org/PR32484
Bug: https://sourceware.org/PR32486
Bug: https://sourceware.org/PR32487
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...6-Revert-macro.c-871-heap-buffer-overflow.patch | 38 ++++++++++++++++++++++
 ...e.patch => 0007-Revert-PR-32391-testcase.patch} |  8 +++--
 ...ix-error-macro-may-be-used-uninitialized.patch} | 10 +++---
 ...he-handling-or-arguments-and-macro-pseud.patch} | 10 +++---
 4 files changed, 53 insertions(+), 13 deletions(-)

diff --git a/9999/0006-Revert-macro.c-871-heap-buffer-overflow.patch 
b/9999/0006-Revert-macro.c-871-heap-buffer-overflow.patch
new file mode 100644
index 0000000..4d0ac10
--- /dev/null
+++ b/9999/0006-Revert-macro.c-871-heap-buffer-overflow.patch
@@ -0,0 +1,38 @@
+From a6aac087c94bab6335335e24aa9ab58ce0682859 Mon Sep 17 00:00:00 2001
+Message-ID: 
<a6aac087c94bab6335335e24aa9ab58ce0682859.1735175975.git....@gentoo.org>
+From: Sam James <[email protected]>
+Date: Thu, 26 Dec 2024 01:15:13 +0000
+Subject: [PATCH 1/4] Revert "macro.c:871 heap-buffer-overflow"
+
+This reverts commit 6d9b7667974372357fed1f02c54a805f8c21dcde.
+---
+ gas/macro.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gas/macro.c b/gas/macro.c
+index ded0645be8d..3d5a9f14341 100644
+--- a/gas/macro.c
++++ b/gas/macro.c
+@@ -868,7 +868,7 @@ sub_actual (size_t start, sb *in, sb *t, struct htab 
*formal_hash,
+         /* The parent's FORMALs might contain parameters that need further
+            substitution.  See gas/testsuite/gas/arm/macro-vld1.s for an
+            example of this.  */
+-        if (memchr (add->ptr, '\\', add->len))
++        if (strchr (add->ptr, '\\'))
+           {
+             sb newadd;
+ 
+@@ -1485,7 +1485,7 @@ delete_macro (const char *name)
+       }
+     }
+ 
+-  if (j < 0)
++  if (macro == NULL)
+     as_warn (_("Attempt to purge non-existing macro `%s'"), copy);
+ 
+   free (copy);
+
+base-commit: fa93e88f754e10dfb60dd4c9bf9cef858d4c7e4a
+-- 
+2.47.1
+

diff --git a/9999/0006-Revert-PR-32391-testcase.patch 
b/9999/0007-Revert-PR-32391-testcase.patch
similarity index 92%
rename from 9999/0006-Revert-PR-32391-testcase.patch
rename to 9999/0007-Revert-PR-32391-testcase.patch
index d847d98..5cfdeec 100644
--- a/9999/0006-Revert-PR-32391-testcase.patch
+++ b/9999/0007-Revert-PR-32391-testcase.patch
@@ -1,8 +1,10 @@
-From 423c670c7d80a334fb9f10b71dcc68c022c2a2a5 Mon Sep 17 00:00:00 2001
-Message-ID: 
<423c670c7d80a334fb9f10b71dcc68c022c2a2a5.1735021582.git....@gentoo.org>
+From bf07b8ac6f4c0ffe4977951d099c09c50fbe0c29 Mon Sep 17 00:00:00 2001
+Message-ID: 
<bf07b8ac6f4c0ffe4977951d099c09c50fbe0c29.1735175975.git....@gentoo.org>
+In-Reply-To: 
<a6aac087c94bab6335335e24aa9ab58ce0682859.1735175975.git....@gentoo.org>
+References: 
<a6aac087c94bab6335335e24aa9ab58ce0682859.1735175975.git....@gentoo.org>
 From: Sam James <[email protected]>
 Date: Tue, 24 Dec 2024 06:25:51 +0000
-Subject: [PATCH 1/3] Revert "PR 32391 testcase"
+Subject: [PATCH 2/4] Revert "PR 32391 testcase"
 
 This reverts commit c8fcfa9aad211dfd8296ae6e978a356797936c61.
 ---

diff --git a/9999/0007-Revert-Fix-error-macro-may-be-used-uninitialized.patch 
b/9999/0008-Revert-Fix-error-macro-may-be-used-uninitialized.patch
similarity index 72%
rename from 9999/0007-Revert-Fix-error-macro-may-be-used-uninitialized.patch
rename to 9999/0008-Revert-Fix-error-macro-may-be-used-uninitialized.patch
index 410cf76..52cbc39 100644
--- a/9999/0007-Revert-Fix-error-macro-may-be-used-uninitialized.patch
+++ b/9999/0008-Revert-Fix-error-macro-may-be-used-uninitialized.patch
@@ -1,10 +1,10 @@
-From bbdfc672d363ee12f00ce6fc6c7660032cdf4f88 Mon Sep 17 00:00:00 2001
-Message-ID: 
<bbdfc672d363ee12f00ce6fc6c7660032cdf4f88.1735021582.git....@gentoo.org>
-In-Reply-To: 
<423c670c7d80a334fb9f10b71dcc68c022c2a2a5.1735021582.git....@gentoo.org>
-References: 
<423c670c7d80a334fb9f10b71dcc68c022c2a2a5.1735021582.git....@gentoo.org>
+From cc2fcd3f83d79ca491c61654b94e267386cdab3a Mon Sep 17 00:00:00 2001
+Message-ID: 
<cc2fcd3f83d79ca491c61654b94e267386cdab3a.1735175975.git....@gentoo.org>
+In-Reply-To: 
<a6aac087c94bab6335335e24aa9ab58ce0682859.1735175975.git....@gentoo.org>
+References: 
<a6aac087c94bab6335335e24aa9ab58ce0682859.1735175975.git....@gentoo.org>
 From: Sam James <[email protected]>
 Date: Tue, 24 Dec 2024 06:25:57 +0000
-Subject: [PATCH 2/3] Revert "Fix error: macro may be used uninitialized"
+Subject: [PATCH 3/4] Revert "Fix error: macro may be used uninitialized"
 
 This reverts commit f404dc565a4ccfe6922b45cf5526c319aedf75d6.
 ---

diff --git 
a/9999/0008-Revert-Fix-the-handling-or-arguments-and-macro-pseud.patch 
b/9999/0009-Revert-Fix-the-handling-or-arguments-and-macro-pseud.patch
similarity index 98%
rename from 9999/0008-Revert-Fix-the-handling-or-arguments-and-macro-pseud.patch
rename to 9999/0009-Revert-Fix-the-handling-or-arguments-and-macro-pseud.patch
index ab3210d..e24e8d2 100644
--- a/9999/0008-Revert-Fix-the-handling-or-arguments-and-macro-pseud.patch
+++ b/9999/0009-Revert-Fix-the-handling-or-arguments-and-macro-pseud.patch
@@ -1,10 +1,10 @@
-From 6bb8e5ad25557fc476ccc64ee925d9c1d199a39a Mon Sep 17 00:00:00 2001
-Message-ID: 
<6bb8e5ad25557fc476ccc64ee925d9c1d199a39a.1735021582.git....@gentoo.org>
-In-Reply-To: 
<423c670c7d80a334fb9f10b71dcc68c022c2a2a5.1735021582.git....@gentoo.org>
-References: 
<423c670c7d80a334fb9f10b71dcc68c022c2a2a5.1735021582.git....@gentoo.org>
+From 499b2dbc38cbd668b62704165ee572c6ab784a4e Mon Sep 17 00:00:00 2001
+Message-ID: 
<499b2dbc38cbd668b62704165ee572c6ab784a4e.1735175975.git....@gentoo.org>
+In-Reply-To: 
<a6aac087c94bab6335335e24aa9ab58ce0682859.1735175975.git....@gentoo.org>
+References: 
<a6aac087c94bab6335335e24aa9ab58ce0682859.1735175975.git....@gentoo.org>
 From: Sam James <[email protected]>
 Date: Tue, 24 Dec 2024 06:26:16 +0000
-Subject: [PATCH 3/3] Revert "Fix the handling or arguments and macro
+Subject: [PATCH 4/4] Revert "Fix the handling or arguments and macro
  pseudo-variables inside nested assembler macros."
 
 This reverts commit 9f2e3c21f6506f081f1360f02b847606e0e00995.

Reply via email to