summaryrefslogtreecommitdiff
path: root/sys-apps/texinfo/files/7.1/0004-tp-Texinfo-XS-parsetexi-tree.c-reset_obstacks.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/texinfo/files/7.1/0004-tp-Texinfo-XS-parsetexi-tree.c-reset_obstacks.patch')
-rw-r--r--sys-apps/texinfo/files/7.1/0004-tp-Texinfo-XS-parsetexi-tree.c-reset_obstacks.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/sys-apps/texinfo/files/7.1/0004-tp-Texinfo-XS-parsetexi-tree.c-reset_obstacks.patch b/sys-apps/texinfo/files/7.1/0004-tp-Texinfo-XS-parsetexi-tree.c-reset_obstacks.patch
new file mode 100644
index 000000000000..6f57363fc435
--- /dev/null
+++ b/sys-apps/texinfo/files/7.1/0004-tp-Texinfo-XS-parsetexi-tree.c-reset_obstacks.patch
@@ -0,0 +1,53 @@
+https://lists.gnu.org/archive/html/bug-texinfo/2023-11/msg00000.html
+https://lists.gnu.org/archive/html/bug-texinfo/2023-11/msg00016.html
+https://lists.gnu.org/archive/html/bug-texinfo/2023-11/msg00073.html
+
+From 81a854e22ca2449f2351436a863e5262935f5dc0 Mon Sep 17 00:00:00 2001
+From: Gavin Smith <gavinsmith0123@gmail.com>
+Date: Mon, 13 Nov 2023 18:43:40 +0000
+Subject: [PATCH 4/5] * tp/Texinfo/XS/parsetexi/tree.c (reset_obstacks): Call
+ obstack_alignment_mask to use 8-byte alignment. Needed for Debian on
+ sparc64. Report of "Bus error" from John Paul Adrian Glaubitz
+ <glaubitz@physik.fu-berlin.de>.
+
+---
+ ChangeLog | 7 +++++++
+ tp/Texinfo/XS/parsetexi/tree.c | 7 ++++++-
+ 2 files changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index efbb3b22d1..a146820671 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,10 @@
++2023-11-13 Gavin Smith <gavinsmith0123@gmail.com>
++
++ * tp/Texinfo/XS/parsetexi/tree.c (reset_obstacks):
++ Call obstack_alignment_mask to use 8-byte alignment. Needed
++ for Debian on sparc64. Report of "Bus error" from
++ John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>.
++
+ 2023-11-04 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * info/scan.c (write_tag_contents): Check if added text is of
+diff --git a/tp/Texinfo/XS/parsetexi/tree.c b/tp/Texinfo/XS/parsetexi/tree.c
+index f2d69e0454..09db6fc151 100644
+--- a/tp/Texinfo/XS/parsetexi/tree.c
++++ b/tp/Texinfo/XS/parsetexi/tree.c
+@@ -43,7 +43,12 @@ reset_obstacks (void)
+ if (obs_element_first)
+ obstack_free (&obs_element, obs_element_first);
+ else
+- obstack_init (&obs_element);
++ {
++ /* Specify 8-byte alignment. Needed for SPARC. */
++ obstack_alignment_mask (&obs_element) = 7;
++
++ obstack_init (&obs_element);
++ }
+
+ obs_element_first = obstack_alloc (&obs_element, sizeof (int));
+ }
+--
+2.42.1
+