Hello community,

here is the log from the commit of package binutils for openSUSE:Factory 
checked in at 2019-04-26 22:42:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/binutils (Old)
 and      /work/SRC/openSUSE:Factory/.binutils.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "binutils"

Fri Apr 26 22:42:44 2019 rev:135 rq:697147 version:2.32

Changes:
--------
--- /work/SRC/openSUSE:Factory/binutils/binutils.changes        2019-04-08 
10:29:59.615113366 +0200
+++ /work/SRC/openSUSE:Factory/.binutils.new.5536/binutils.changes      
2019-04-26 22:42:51.465692354 +0200
@@ -1,0 +2,5 @@
+Tue Apr 23 07:46:10 UTC 2019 - Martin Liška <[email protected]>
+
+- Add rx-gas-padding-pr24464.patch: fix for PR24464.
+
+-------------------------------------------------------------------
cross-aarch64-binutils.changes: same change
cross-arm-binutils.changes: same change
cross-avr-binutils.changes: same change
cross-epiphany-binutils.changes: same change
cross-hppa-binutils.changes: same change
cross-hppa64-binutils.changes: same change
cross-i386-binutils.changes: same change
cross-ia64-binutils.changes: same change
cross-m68k-binutils.changes: same change
cross-mips-binutils.changes: same change
cross-ppc-binutils.changes: same change
cross-ppc64-binutils.changes: same change
cross-ppc64le-binutils.changes: same change
cross-riscv64-binutils.changes: same change
cross-rx-binutils.changes: same change
cross-s390-binutils.changes: same change
cross-s390x-binutils.changes: same change
cross-sparc-binutils.changes: same change
cross-sparc64-binutils.changes: same change
cross-spu-binutils.changes: same change
cross-x86_64-binutils.changes: same change

New:
----
  rx-gas-padding-pr24464.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ binutils.spec ++++++
--- /var/tmp/diff_new_pack.ythQH9/_old  2019-04-26 22:42:59.849688078 +0200
+++ /var/tmp/diff_new_pack.ythQH9/_new  2019-04-26 22:42:59.853688076 +0200
@@ -95,6 +95,7 @@
 Patch36:        binutils-pr22868.diff
 Patch37:        binutils-revert-plt32-in-branches.diff
 Patch38:        riscv-abi-check.patch
+Patch39:        rx-gas-padding-pr24464.patch
 Patch90:        cross-avr-nesc-as.patch
 Patch92:        cross-avr-omit_section_dynsym.patch
 Patch93:        cross-avr-size.patch
@@ -167,6 +168,7 @@
 %patch37 -p1
 %endif
 %patch38 -p1
+%patch39 -p1
 %if "%{TARGET}" == "avr"
 cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
 %patch90

++++++ cross-aarch64-binutils.spec ++++++
--- /var/tmp/diff_new_pack.ythQH9/_old  2019-04-26 22:42:59.869688068 +0200
+++ /var/tmp/diff_new_pack.ythQH9/_new  2019-04-26 22:42:59.873688066 +0200
@@ -98,6 +98,7 @@
 Patch36:        binutils-pr22868.diff
 Patch37:        binutils-revert-plt32-in-branches.diff
 Patch38:        riscv-abi-check.patch
+Patch39:        rx-gas-padding-pr24464.patch
 Patch90:        cross-avr-nesc-as.patch
 Patch92:        cross-avr-omit_section_dynsym.patch
 Patch93:        cross-avr-size.patch
@@ -170,6 +171,7 @@
 %patch37 -p1
 %endif
 %patch38 -p1
+%patch39 -p1
 %if "%{TARGET}" == "avr"
 cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
 %patch90

cross-arm-binutils.spec: same change
cross-avr-binutils.spec: same change
cross-epiphany-binutils.spec: same change
cross-hppa-binutils.spec: same change
cross-hppa64-binutils.spec: same change
cross-i386-binutils.spec: same change
cross-ia64-binutils.spec: same change
cross-m68k-binutils.spec: same change
cross-mips-binutils.spec: same change
cross-ppc-binutils.spec: same change
cross-ppc64-binutils.spec: same change
cross-ppc64le-binutils.spec: same change
cross-riscv64-binutils.spec: same change
cross-rx-binutils.spec: same change
cross-s390-binutils.spec: same change
cross-s390x-binutils.spec: same change
cross-sparc-binutils.spec: same change
cross-sparc64-binutils.spec: same change
cross-spu-binutils.spec: same change
cross-x86_64-binutils.spec: same change


++++++ rx-gas-padding-pr24464.patch ++++++
>From 5ce032bdfc60a8f44f6307b2297384c852100f95 Mon Sep 17 00:00:00 2001
From: Nick Clifton <[email protected]>
Date: Fri, 19 Apr 2019 10:39:47 +0100
Subject: [PATCH] RX Assembler: Ensure that the internal limit on the number of
 relaxation iterations is not larger that the external limit.

        PR 24464
        * config/tc-rx.h (md_relax_frag): Pass the max_iterations variable
        to the relaxation function.
        * config/tc-rx.c (rx_relax_frag): Add new parameter - the maximum
        number of iterations.  Make sure that our internal iteration limit
        does not exceed this external iteration limit.
---
 gas/ChangeLog      |  9 +++++++++
 gas/config/tc-rx.c | 19 +++++++++++++------
 gas/config/tc-rx.h | 11 +++++++++--
 3 files changed, 31 insertions(+), 8 deletions(-)

diff --git a/gas/config/tc-rx.c b/gas/config/tc-rx.c
index 8688837b31..6b19f2f397 100644
--- a/gas/config/tc-rx.c
+++ b/gas/config/tc-rx.c
@@ -740,8 +740,8 @@ typedef struct rx_bytesT
   int n_relax;
   int link_relax;
   fixS *link_relax_fixP;
-  char times_grown;
-  char times_shrank;
+  unsigned long times_grown;
+  unsigned long times_shrank;
 } rx_bytesT;
 
 static rx_bytesT rx_bytes;
@@ -1558,7 +1558,7 @@ rx_next_opcode (fragS *fragP)
    fr_subtype to calculate the difference.  */
 
 int
-rx_relax_frag (segT segment ATTRIBUTE_UNUSED, fragS * fragP, long stretch)
+rx_relax_frag (segT segment ATTRIBUTE_UNUSED, fragS * fragP, long stretch, 
unsigned long max_iterations)
 {
   addressT addr0, sym_addr;
   addressT mypc;
@@ -1755,9 +1755,16 @@ rx_relax_frag (segT segment ATTRIBUTE_UNUSED, fragS * 
fragP, long stretch)
   /* This prevents infinite loops in align-heavy sources.  */
   if (newsize < oldsize)
     {
-      if (fragP->tc_frag_data->times_shrank > 10
-         && fragP->tc_frag_data->times_grown > 10)
-       newsize = oldsize;
+      /* Make sure that our iteration limit is no bigger than the one being
+        used inside write.c:relax_segment().  Otherwise we can end up
+        iterating for too long, and triggering a fatal error there.  See
+        PR 24464 for more details.  */
+      unsigned long limit = max_iterations > 10 ? 10 : max_iterations;
+
+      if (fragP->tc_frag_data->times_shrank > limit
+         && fragP->tc_frag_data->times_grown > limit)
+       newsize = oldsize;
+
       if (fragP->tc_frag_data->times_shrank < 20)
        fragP->tc_frag_data->times_shrank ++;
     }
diff --git a/gas/config/tc-rx.h b/gas/config/tc-rx.h
index 09c50f9471..69302e565b 100644
--- a/gas/config/tc-rx.h
+++ b/gas/config/tc-rx.h
@@ -54,8 +54,15 @@
 #define md_end rx_md_end
 extern void rx_md_end (void);
 
-#define md_relax_frag rx_relax_frag
-extern int rx_relax_frag (segT, fragS *, long);
+/* Note - the definition of MD_RELAX_FRAG here includes a reference to the
+   MAX_ITERATIONS variable which is defined locally in write.c:relax_segment()
+   but which is not normally passed to target specific relaxing code.  This
+   reference is needed however as the number of iterations of the RX relaxing
+   code needs to be constrained by the maximum number of iterations allowed
+   by relax_segment().  See PR 24464 for more details.  */
+#define md_relax_frag(SEG, FRAGP, STRETCH) \
+  rx_relax_frag ((SEG), (FRAGP), (STRETCH), max_iterations)
+extern int rx_relax_frag (segT, fragS *, long, unsigned long);
 
 #define TC_FRAG_TYPE struct rx_bytesT *
 #define TC_FRAG_INIT rx_frag_init
-- 
2.21.0


Reply via email to