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 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 . --- 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 + + * 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 . + 2023-11-04 Gavin Smith * 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