gbranden pushed a commit to branch master
in repository groff.
commit 4ec63c0d1fcbd383df1602078c61e1f9eaba801d
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Jul 26 20:47:24 2026 -0500
[tbl]: Regression-test Savannah #68570.
* src/preproc/tbl/tests/do-not-segv-on-span-only-table-description.sh:
Do it.
* src/preproc/tbl/tbl.am (tbl_TESTS): Run test.
Test fails at this commit.
---
ChangeLog | 8 ++++
src/preproc/tbl/tbl.am | 1 +
.../do-not-segv-on-span-only-table-description.sh | 44 ++++++++++++++++++++++
3 files changed, 53 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 8489308b1..90143d12f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-07-26 G. Branden Robinson <[email protected]>
+
+ [tbl]: Regression-test Savannah #68570.
+
+ * src/preproc/tbl/tests/\
+ do-not-segv-on-span-only-table-description.sh: Do it.
+ * src/preproc/tbl/tbl.am (tbl_TESTS): Run test.
+
2026-07-24 G. Branden Robinson <[email protected]>
[troff]: Fix Savannah #68552.
diff --git a/src/preproc/tbl/tbl.am b/src/preproc/tbl/tbl.am
index ba6bf84d7..c83d87c8a 100644
--- a/src/preproc/tbl/tbl.am
+++ b/src/preproc/tbl/tbl.am
@@ -36,6 +36,7 @@ tbl_TESTS = \
src/preproc/tbl/tests/do-not-overdraw-page-top-in-nroff-mode.sh \
src/preproc/tbl/tests/do-not-overlap-bottom-border-in-nroff.sh \
src/preproc/tbl/tests/do-not-segv-on-invalid-vertical-span-entry.sh \
+ src/preproc/tbl/tests/do-not-segv-on-span-only-table-description.sh \
src/preproc/tbl/tests/do-not-segv-when-backslash-R-in-text-block.sh \
src/preproc/tbl/tests/emit-accurate-lf-requests.sh \
src/preproc/tbl/tests/expand-region-option-works.sh \
diff --git
a/src/preproc/tbl/tests/do-not-segv-on-span-only-table-description.sh
b/src/preproc/tbl/tests/do-not-segv-on-span-only-table-description.sh
new file mode 100755
index 000000000..779f48dcb
--- /dev/null
+++ b/src/preproc/tbl/tests/do-not-segv-on-span-only-table-description.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# Copyright 2026 G. Branden Robinson
+#
+# This file is part of groff, the GNU roff typesetting system.
+#
+# groff is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+tbl="${abs_top_builddir:-.}/tbl"
+
+# Regression-test Savannah #68570.
+#
+# Don't segfault if the table description consists solely of horizontal
+# span column classifiers that we have to discard because they're
+# invalid in the first column. If the table "description" contains
+# nothing but these, we never manage to construct one.
+#
+# Thanks to Elias Hasas for suggesting a very similar reproducer.
+
+input='.
+.TS
+SS,S.
+foo
+.TE
+fnord
+.'
+
+output=$(printf '%s\n' "$input" | "$tbl")
+printf '%s\n' "$output"
+printf '%s\n' "$output" | grep -Fqx "fnord"
+
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit