commit:     6832c5a8fb253c080d9fb43ba83210c67bcbe2a2
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  1 14:04:51 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan  1 14:04:51 2025 +0000
URL:        
https://gitweb.gentoo.org/proj/toolchain/binutils-patches.git/commit/?id=6832c5a8

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>

 9999/0006-Revert-PR-32391-memory-leak.patch        | 28 +++++++++++++++++
 ...-Revert-macro.c-871-heap-buffer-overflow.patch} | 14 ++++-----
 ...e.patch => 0008-Revert-PR-32391-testcase.patch} | 12 ++++----
 ...ix-error-macro-may-be-used-uninitialized.patch} | 14 ++++-----
 ...he-handling-or-arguments-and-macro-pseud.patch} | 36 +++++++++++-----------
 5 files changed, 66 insertions(+), 38 deletions(-)

diff --git a/9999/0006-Revert-PR-32391-memory-leak.patch 
b/9999/0006-Revert-PR-32391-memory-leak.patch
new file mode 100644
index 0000000..a20c54d
--- /dev/null
+++ b/9999/0006-Revert-PR-32391-memory-leak.patch
@@ -0,0 +1,28 @@
+From 4bed21d47f9d838dc6b55ce026989ede4eacc789 Mon Sep 17 00:00:00 2001
+Message-ID: 
<4bed21d47f9d838dc6b55ce026989ede4eacc789.1735740264.git....@gentoo.org>
+From: Sam James <[email protected]>
+Date: Wed, 1 Jan 2025 14:03:43 +0000
+Subject: [PATCH 06/10] Revert "PR 32391 memory leak"
+
+This reverts commit 599739cc1c5d70ac958583130b4b5413aa101d8e.
+---
+ gas/macro.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/gas/macro.c b/gas/macro.c
+index 9eefc8360b1..9670b38c152 100644
+--- a/gas/macro.c
++++ b/gas/macro.c
+@@ -878,7 +878,6 @@ sub_actual (size_t start, sb *in, sb *t, struct htab 
*formal_hash,
+             (void) macro_expand_body (add, &newadd, NULL, NULL,
+                                       orig_macro, orig_macro->count);
+             sb_add_sb (out, &newadd);
+-            sb_kill (&newadd);
+           }
+         else
+           {
+
+base-commit: 94e2b2a770fc49e42c9baec80f4fb88f63391a4e
+-- 
+2.47.1
+

diff --git a/9999/0006-Revert-macro.c-871-heap-buffer-overflow.patch 
b/9999/0007-Revert-macro.c-871-heap-buffer-overflow.patch
similarity index 65%
rename from 9999/0006-Revert-macro.c-871-heap-buffer-overflow.patch
rename to 9999/0007-Revert-macro.c-871-heap-buffer-overflow.patch
index 4d0ac10..b461443 100644
--- a/9999/0006-Revert-macro.c-871-heap-buffer-overflow.patch
+++ b/9999/0007-Revert-macro.c-871-heap-buffer-overflow.patch
@@ -1,8 +1,10 @@
-From a6aac087c94bab6335335e24aa9ab58ce0682859 Mon Sep 17 00:00:00 2001
-Message-ID: 
<a6aac087c94bab6335335e24aa9ab58ce0682859.1735175975.git....@gentoo.org>
+From 7daa5da3eab39e733f40eccbf4f6cd2078e3335e Mon Sep 17 00:00:00 2001
+Message-ID: 
<7daa5da3eab39e733f40eccbf4f6cd2078e3335e.1735740264.git....@gentoo.org>
+In-Reply-To: 
<4bed21d47f9d838dc6b55ce026989ede4eacc789.1735740264.git....@gentoo.org>
+References: 
<4bed21d47f9d838dc6b55ce026989ede4eacc789.1735740264.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"
+Date: Wed, 1 Jan 2025 14:03:44 +0000
+Subject: [PATCH 07/10] Revert "macro.c:871 heap-buffer-overflow"
 
 This reverts commit 6d9b7667974372357fed1f02c54a805f8c21dcde.
 ---
@@ -10,7 +12,7 @@ This reverts commit 6d9b7667974372357fed1f02c54a805f8c21dcde.
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/gas/macro.c b/gas/macro.c
-index ded0645be8d..3d5a9f14341 100644
+index 9670b38c152..5fa2011ab7a 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,
@@ -31,8 +33,6 @@ index ded0645be8d..3d5a9f14341 100644
      as_warn (_("Attempt to purge non-existing macro `%s'"), copy);
  
    free (copy);
-
-base-commit: fa93e88f754e10dfb60dd4c9bf9cef858d4c7e4a
 -- 
 2.47.1
 

diff --git a/9999/0007-Revert-PR-32391-testcase.patch 
b/9999/0008-Revert-PR-32391-testcase.patch
similarity index 91%
rename from 9999/0007-Revert-PR-32391-testcase.patch
rename to 9999/0008-Revert-PR-32391-testcase.patch
index 5cfdeec..4376e58 100644
--- a/9999/0007-Revert-PR-32391-testcase.patch
+++ b/9999/0008-Revert-PR-32391-testcase.patch
@@ -1,10 +1,10 @@
-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 da631c6ce21783acebd2dc44b834fd17c84a0381 Mon Sep 17 00:00:00 2001
+Message-ID: 
<da631c6ce21783acebd2dc44b834fd17c84a0381.1735740264.git....@gentoo.org>
+In-Reply-To: 
<4bed21d47f9d838dc6b55ce026989ede4eacc789.1735740264.git....@gentoo.org>
+References: 
<4bed21d47f9d838dc6b55ce026989ede4eacc789.1735740264.git....@gentoo.org>
 From: Sam James <[email protected]>
-Date: Tue, 24 Dec 2024 06:25:51 +0000
-Subject: [PATCH 2/4] Revert "PR 32391 testcase"
+Date: Wed, 1 Jan 2025 14:03:45 +0000
+Subject: [PATCH 08/10] Revert "PR 32391 testcase"
 
 This reverts commit c8fcfa9aad211dfd8296ae6e978a356797936c61.
 ---

diff --git a/9999/0008-Revert-Fix-error-macro-may-be-used-uninitialized.patch 
b/9999/0009-Revert-Fix-error-macro-may-be-used-uninitialized.patch
similarity index 66%
rename from 9999/0008-Revert-Fix-error-macro-may-be-used-uninitialized.patch
rename to 9999/0009-Revert-Fix-error-macro-may-be-used-uninitialized.patch
index 52cbc39..dd6ff9a 100644
--- a/9999/0008-Revert-Fix-error-macro-may-be-used-uninitialized.patch
+++ b/9999/0009-Revert-Fix-error-macro-may-be-used-uninitialized.patch
@@ -1,10 +1,10 @@
-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 44100045e8d1df5df3578d60206df94498bcd236 Mon Sep 17 00:00:00 2001
+Message-ID: 
<44100045e8d1df5df3578d60206df94498bcd236.1735740264.git....@gentoo.org>
+In-Reply-To: 
<4bed21d47f9d838dc6b55ce026989ede4eacc789.1735740264.git....@gentoo.org>
+References: 
<4bed21d47f9d838dc6b55ce026989ede4eacc789.1735740264.git....@gentoo.org>
 From: Sam James <[email protected]>
-Date: Tue, 24 Dec 2024 06:25:57 +0000
-Subject: [PATCH 3/4] Revert "Fix error: macro may be used uninitialized"
+Date: Wed, 1 Jan 2025 14:03:46 +0000
+Subject: [PATCH 09/10] Revert "Fix error: macro may be used uninitialized"
 
 This reverts commit f404dc565a4ccfe6922b45cf5526c319aedf75d6.
 ---
@@ -12,7 +12,7 @@ This reverts commit f404dc565a4ccfe6922b45cf5526c319aedf75d6.
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/gas/macro.c b/gas/macro.c
-index 3d5a9f14341..a0f2a5c764c 100644
+index 5fa2011ab7a..c1b43e76a61 100644
 --- a/gas/macro.c
 +++ b/gas/macro.c
 @@ -1411,6 +1411,7 @@ check_macro (const char *line, sb *expand,

diff --git 
a/9999/0009-Revert-Fix-the-handling-or-arguments-and-macro-pseud.patch 
b/9999/0010-Revert-Fix-the-handling-or-arguments-and-macro-pseud.patch
similarity index 96%
rename from 9999/0009-Revert-Fix-the-handling-or-arguments-and-macro-pseud.patch
rename to 9999/0010-Revert-Fix-the-handling-or-arguments-and-macro-pseud.patch
index e24e8d2..3a3b6c0 100644
--- a/9999/0009-Revert-Fix-the-handling-or-arguments-and-macro-pseud.patch
+++ b/9999/0010-Revert-Fix-the-handling-or-arguments-and-macro-pseud.patch
@@ -1,10 +1,10 @@
-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 cfb2c161d55d2a4ab5ab3729b16ad364c8ec1c3f Mon Sep 17 00:00:00 2001
+Message-ID: 
<cfb2c161d55d2a4ab5ab3729b16ad364c8ec1c3f.1735740264.git....@gentoo.org>
+In-Reply-To: 
<4bed21d47f9d838dc6b55ce026989ede4eacc789.1735740264.git....@gentoo.org>
+References: 
<4bed21d47f9d838dc6b55ce026989ede4eacc789.1735740264.git....@gentoo.org>
 From: Sam James <[email protected]>
-Date: Tue, 24 Dec 2024 06:26:16 +0000
-Subject: [PATCH 4/4] Revert "Fix the handling or arguments and macro
+Date: Wed, 1 Jan 2025 14:03:46 +0000
+Subject: [PATCH 10/10] Revert "Fix the handling or arguments and macro
  pseudo-variables inside nested assembler macros."
 
 This reverts commit 9f2e3c21f6506f081f1360f02b847606e0e00995.
@@ -23,7 +23,7 @@ This reverts commit 9f2e3c21f6506f081f1360f02b847606e0e00995.
  delete mode 100644 gas/testsuite/gas/macros/nesting.s
 
 diff --git a/gas/config/tc-iq2000.c b/gas/config/tc-iq2000.c
-index 1cbc578281f..2198ffda2b9 100644
+index 8dc3b768e3a..c65f264528f 100644
 --- a/gas/config/tc-iq2000.c
 +++ b/gas/config/tc-iq2000.c
 @@ -105,6 +105,8 @@ struct iq2000_hi_fixup
@@ -47,7 +47,7 @@ index 1cbc578281f..2198ffda2b9 100644
  
  static void
 diff --git a/gas/doc/as.texi b/gas/doc/as.texi
-index 1683594a0bb..6be54b57599 100644
+index 69d6d3c88b0..c9f65a47125 100644
 --- a/gas/doc/as.texi
 +++ b/gas/doc/as.texi
 @@ -6215,12 +6215,7 @@ With that definition, @samp{SUM 0,5} is equivalent to 
this assembly input:
@@ -139,7 +139,7 @@ index 1683594a0bb..6be54b57599 100644
  @node PushSection
  @section @code{.pushsection @var{name} [, @var{subsection}] [, 
"@var{flags}"[, @@@var{type}[,@var{arguments}]]]}
 diff --git a/gas/input-scrub.c b/gas/input-scrub.c
-index 25fac879a56..878edc8fd36 100644
+index 3433bc6472d..2e0ce832b2b 100644
 --- a/gas/input-scrub.c
 +++ b/gas/input-scrub.c
 @@ -23,7 +23,6 @@
@@ -175,7 +175,7 @@ index 25fac879a56..878edc8fd36 100644
          if (from_sb_expansion != expanding_app)
            --macro_nest;
 diff --git a/gas/macro.c b/gas/macro.c
-index a0f2a5c764c..8b376f7f490 100644
+index c1b43e76a61..5ae76c6e661 100644
 --- a/gas/macro.c
 +++ b/gas/macro.c
 @@ -44,24 +44,11 @@
@@ -642,7 +642,7 @@ index a0f2a5c764c..8b376f7f490 100644
 -    }
 -}
 diff --git a/gas/macro.h b/gas/macro.h
-index 97f2a5a4066..e87f64e70ca 100644
+index 55b28b2f82a..3ebcfe8c8fd 100644
 --- a/gas/macro.h
 +++ b/gas/macro.h
 @@ -64,28 +64,31 @@ typedef struct macro_struct
@@ -685,10 +685,10 @@ index 97f2a5a4066..e87f64e70ca 100644
  
  #endif
 diff --git a/gas/read.c b/gas/read.c
-index e5185f4ba26..589c7b080c2 100644
+index 5be2686822d..6d0d4b5e31a 100644
 --- a/gas/read.c
 +++ b/gas/read.c
-@@ -655,8 +655,7 @@ poend (void)
+@@ -656,8 +656,7 @@ poend (void)
      }
  
  /* Helper function of read_a_source_file, which tries to expand a macro.  */
@@ -698,7 +698,7 @@ index e5185f4ba26..589c7b080c2 100644
  try_macro (char term, const char *line)
  {
    sb out;
-@@ -673,14 +672,12 @@ try_macro (char term, const char *line)
+@@ -674,14 +673,12 @@ try_macro (char term, const char *line)
        sb_kill (&out);
        buffer_limit =
        input_scrub_next_buffer (&input_line_pointer);
@@ -715,7 +715,7 @@ index e5185f4ba26..589c7b080c2 100644
  }
  
  #ifdef HANDLE_BUNDLE
-@@ -1272,7 +1269,7 @@ read_a_source_file (const char *name)
+@@ -1273,7 +1270,7 @@ read_a_source_file (const char *name)
                          s_ignore (0);
                          nul_char = next_char = *--input_line_pointer;
                          *input_line_pointer = '\0';
@@ -724,7 +724,7 @@ index e5185f4ba26..589c7b080c2 100644
                            {
                              *end = '\0';
                              as_bad (_("unknown pseudo-op: `%s'"), s);
-@@ -1309,7 +1306,7 @@ read_a_source_file (const char *name)
+@@ -1310,7 +1307,7 @@ read_a_source_file (const char *name)
  
                      generate_lineno_debug ();
  
@@ -733,7 +733,7 @@ index e5185f4ba26..589c7b080c2 100644
                        continue;
  
                      if (mri_pending_align)
-@@ -2819,7 +2816,7 @@ s_macro (int ignore ATTRIBUTE_UNUSED)
+@@ -2820,7 +2817,7 @@ s_macro (int ignore ATTRIBUTE_UNUSED)
          as_warn_where (macro->file, macro->line,
                         _("attempt to redefine pseudo-op `%s' ignored"),
                         macro->name);
@@ -743,7 +743,7 @@ index e5185f4ba26..589c7b080c2 100644
      }
  
 diff --git a/gas/testsuite/gas/macros/macros.exp 
b/gas/testsuite/gas/macros/macros.exp
-index 94ac37cdb8b..3ac199feaa5 100644
+index de3df4d803d..278cf405225 100644
 --- a/gas/testsuite/gas/macros/macros.exp
 +++ b/gas/testsuite/gas/macros/macros.exp
 @@ -112,4 +112,3 @@ run_list_test count

Reply via email to