summaryrefslogtreecommitdiff
path: root/sys-apps/texinfo/files/7.1/0004-tp-Texinfo-XS-parsetexi-tree.c-reset_obstacks.patch
blob: 6f57363fc435823938b748c8a915f51d0f2e1c0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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