Article View: linux.debian.bugs.rc
Article #3744Bug#1153649: groff: crashes during brltty build
From: G. Branden Robinson
Date: Sat, 21 Nov 2026 03:20
Date: Sat, 21 Nov 2026 03:20
108 lines
6535 bytes
6535 bytes
--didadtobni4mccym
Content-Type: multipart/mixed; protected-headers=v1;
boundary="qe3dwjf6nrvqhzb4"
Content-Disposition: inline
Subject: Re: Bug#1153649: groff: crashes during brltty build
MIME-Version: 1.0
--qe3dwjf6nrvqhzb4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi Colin,
I, too, found it tedious to reproduce this problem.
I _think_ this is a fix. When I built using a groff (grotty) with this
patch and "dpkg-buildpackage -us -uc"-ed brltty again, the build got
farther and then broke for seemingly non-groff-related reasons.
If I'm right, then a small initial page length or a large vertical
motion--one that would carry you beyond twice the current page
length--would read beyond the bounds of the `lines` array.
And, again if I'm right, then the reason this problem wasn't observed in
groff 1.24.x and earlier is because it's a new bug introduced by me, in
an effort to make NixOS users happier.
But they switched to mandoc(1), where I guess they plan to stay since
they haven't gotten back to me after 6 months.
https://github.com/NixOS/nixpkgs/pull/514498
commit ca72a86dbdbf13e2602f9e2fae26e3b9cd42c715 (HEAD -> master)
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date: Fri Nov 20 20:41:07 2026 -0600
XXX [grotty]: Fix Debian #1153649?
diff --git a/src/devices/grotty/tty.cpp b/src/devices/grotty/tty.cpp
index b7d0cbfc1..cbac7b6bc 100644
--- a/src/devices/grotty/tty.cpp
+++ b/src/devices/grotty/tty.cpp
@@ -425,7 +425,9 @@ void tty_printer::add_char(output_character c, int w,
tty_glyph **old_lines = lines;
// If we exceed the previous page length, double the size so that
// we don't thrash the allocator. See Savannah #68145.
- int new_nlines = nlines * 2;
+ int new_nlines = nlines;
+ while (vpos > new_nlines)
+ new_nlines *= 2;
lines = 0 /* nullptr */;
try {
lines = new tty_glyph *[new_nlines];
Regards,
Branden
--qe3dwjf6nrvqhzb4
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="debian-1153649.diff"
commit ca72a86dbdbf13e2602f9e2fae26e3b9cd42c715
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date: Fri Nov 20 20:41:07 2026 -0600
XXX [grotty]: Fix Debian #1153649?
diff --git a/src/devices/grotty/tty.cpp b/src/devices/grotty/tty.cpp
index b7d0cbfc1..cbac7b6bc 100644
--- a/src/devices/grotty/tty.cpp
+++ b/src/devices/grotty/tty.cpp
@@ -425,7 +425,9 @@ void tty_printer::add_char(output_character c, int w,
tty_glyph **old_lines = lines;
// If we exceed the previous page length, double the size so that
// we don't thrash the allocator. See Savannah #68145.
- int new_nlines = nlines * 2;
+ int new_nlines = nlines;
+ while (vpos > new_nlines)
+ new_nlines *= 2;
lines = 0 /* nullptr */;
try {
lines = new tty_glyph *[new_nlines];
--qe3dwjf6nrvqhzb4--
--didadtobni4mccym
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmsBC+IACgkQ0Z6cfXEm
bc7qkQ//e/j2Tk+AwdZC8Fpnwhjgf0XxBXGyfYfefcXhNtseU48VJkbCW2F/cC3U
8N6L6V5iQrLRYhxnSOqD9dN23rIT3e8aC7pJfTJ4RCIAg7l5G/hdOgzahOMxrdui
KzRLpiqrghFh817AtoO3dSj9wdptOxY3dOQWQrV2EylSZN/xBPrVijU0M1GCTwJp
GhAzPdrWLwwjldzvp5sQ1w7r4qb/DdfZnVHgrIetSRWk0Fry94yDgJyoLmSAMukn
G7zm1aXnhdyTZJAcNS57fJNHY2EWd0f4ILxXXOmKiyC/9938xBq0azcbgHW6ir7L
jzGokbPQ0sNMSQU1G9tEolOMHmZM3/LkFZdg/AW34+DchCFGNhwSTgmBuW0D6oP6
G5p96uq5M24gShNlxJcMWB9q2Q+PDrdeAmXgGFWF4qA1wvC2jGpRceCS7PK9q6ei
mXxRwz3aTGuXBRdajSQ623GVxV5AB/ldbo/FOVMiETwRs3a6CX7X2W4G20Jz/NbL
IlA46UdfqaWsj8FawHH3bt7L2uDGkdkra698mBfTBSvvdxYUpvhcvhJ01r6GEnAf
Z4pAWlVsXMgk7rMoGyG9cjrPGM+e272AMZTLdJYBM0FGjwf2IwTEQ7BiEG+ka66w
+sgQojCBWozAtz2JnTtvUSP0NocRbEHol7x+9B8WdKq1qpN10+A=
=lmy8
-----END PGP SIGNATURE-----
--didadtobni4mccym--
Technical Details
Message-ID:
<O1JNU-dccX-5@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.corradoroberto.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomodReferences:
<NXXPr-b3CZ-5@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.corradoroberto.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod
From: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Newsgroups: linux.debian.bugs.rc
Subject: Bug#1153649: groff: crashes during brltty build
Date: Sat, 21 Nov 2026 04:20:02 +0100
Message-ID: <O1JNU-dccX-5@gated-at.bofh.it>
References: <NXXPr-b3CZ-5@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-rc-request@lists.debian.org Sat Nov 21 03:13:07 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -0.548
Reply-To: "G. Branden Robinson" <g.branden.robinson@gmail.com>, 1153649@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: cjwatson@debian.org
X-Debian-Pr-Message: followup 1153649
X-Debian-Pr-Package: groff
X-Debian-Pr-Keywords: sid forky ftbfs
X-Debian-Pr-Source: groff
X-Gm-Message-State: APuU4Z91R82YHczrGKvAY8uvYO/Ptep1n+8OiroADtP7FLUL726VVwmZ
aUqufsoobIKTfJzuwQmu616YFNUUvlBqJsWblXLujPyappuwXXH6rQ/Q2mKz1w==
X-Gm-Gg: AZFdTZcgRE01RRiHu3es45nuG6wk2XxAfL8UYtWmt++mR8HHFV6srWCq6ER4H12P1rn
av/2gu0ihPCFRL20oe4H8bQs34FXzTvPBe3FuiAnPQdteR6CFyDH2zXSARfABnXkotGC3L5jJ9D
vf2slZGQVkTUCu4hFSJvfAchTtdjz0aT8JMdsTbufjspr6RhqA7NktL5nsxOJ9/Q9UwKP2A0oTq
Q0SCjuoMurTNW/I8avUo4kUO6TwP8W77eR6rEXzwL2WVjOi8RcWv53hVwXNOkUGJOu5xL+8jrWi
lYY3FbDQXOsxepxGSATOD+K1xu9w8zTOYevFE8pwRQBVOWCT6QRFnxaNKD/LUd6VvgYVw0rS19y
fJXAcxFQNuc5ff6hhj2820d+qveiqJMPB3hB/+hKwt7rBwjK1JNCdjN2kKocG3Ej+1I9iTsSNmT
HPDqm2zN/b/u2gkRU2LuJ6pdQ/0075m4+Tk8kAAUQtj+gyruGg6LkD2vvTSACNn0tnZb3D7WPw6
4+BOJA/9jL56s6RjjIqKVLnYPvJI3saDh37GbsQDbCKMGuPVTl/hxSA2eNLEPBvYd6wrBq58InF
0UmKYKQdH2UZWhDFEA==
X-Received: by 2002:a05:690e:813:10b0:67c:2674:ec65 with SMTP id 956f58d0204a3-67df441c958mr1417904d50.59.1795230700889;
Fri, 20 Nov 2026 19:11:40 -0800 (PST)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
protocol="application/pgp-signature"; boundary="didadtobni4mccym"
Content-Disposition: inline
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-rc@lists.debian.org> archive/latest/839018
List-ID: <debian-bugs-rc.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-rc/>
Approved: robomod@news.nic.it
Lines: 108
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: sthibault@debian.org
X-Original-Date: Fri, 20 Nov 2026 21:11:37 -0600
X-Original-Message-ID: <20261121031137.a5ymgyrjolbpyzqf@illithid>
X-Original-References: <avNSxEb1fWF20HE9@end>