[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: groff: grops and grodvi crash on invalid input
From: |
John Gardner |
Subject: |
Re: groff: grops and grodvi crash on invalid input |
Date: |
Sun, 22 Nov 2020 13:42:22 +1100 |
>
> In the meantime, John Gardner, who's written his own "ditroff"
> interpreter in JavaScript, might be able to offer some useful insights
> on the well-formedness of your sample documents.
Sorry, I completely missed this.
The samples look fine. Try converting their line-endings from CRLF to LF
and see if that fixes it.
On Wed, 18 Nov 2020 at 20:15, G. Branden Robinson <
g.branden.robinson@gmail.com> wrote:
> Hi Brian,
>
> Following up on an almost 14 year old bug report...
>
> I can't reproduce these SEGVs with groff git HEAD. I would have thought
> they're the same bug since the groff output drivers outsource all of
> their parsing to the driver library, src/libs/libdriver/input.cpp.
>
> However, there's some suggestive evidence that's not the case.
>
> I cannot reproduce the grops SEGV with groff 1.22.4 from Debian.
>
> I _can_ reproduce the grodvi SEGV with groff 1.22.4, but neither SEGV
> happens with groff git HEAD. The only change to the source code that
> can conceivably explain that in the meantime is this:
>
> commit 5d0990500c2d16ed1025f1f0738cb419800652fe
> Author: G. Branden Robinson <g.branden.robinson@gmail.com>
> Date: Thu Jun 27 04:42:51 2019 +1000
>
> libdriver: Fix SEGV (Savannah #56555).
>
> Check result of set_char_and_width() for error condition before relying
> on it.
>
> ...but I'm not too sure. groff 1.22.4 with grops might be working for
> me out of dumb luck. But your commands _are_ trying to set glyphs,
> so...maybe.
>
> Incidentally the libdriver diagnostics are both too verbose and too
> vague. You get doubled diags for failures parsing a 'c' construct but
> for most other "ditroff" commands, the most you will get is "missing
> argument" and a line number, which is especially dopey because the
> format is loose enough to allow multiple commands per line in many
> cases.
>
> I have a sketch for a fix for these problems. It's ugly enough that I
> expect some pushback from the groff mailing list over its esthetics. So
> let's get that out of the way--I'll CC them.
>
> In the meantime, John Gardner, who's written his own "ditroff"
> interpreter in JavaScript, might be able to offer some useful insights
> on the well-formedness of your sample documents.
>
> Regards,
> Branden
>
- Re: groff: grops and grodvi crash on invalid input, G. Branden Robinson, 2020/11/18
- Re: groff: grops and grodvi crash on invalid input,
John Gardner <=
- Re: groff: grops and grodvi crash on invalid input, G. Branden Robinson, 2020/11/22
- Re: groff: grops and grodvi crash on invalid input, G. Branden Robinson, 2020/11/22
- Re: groff: grops and grodvi crash on invalid input, John Gardner, 2020/11/22
- Re: groff: grops and grodvi crash on invalid input, John Gardner, 2020/11/22
- Re: groff: grops and grodvi crash on invalid input, G. Branden Robinson, 2020/11/22
- Re: groff: grops and grodvi crash on invalid input, John Gardner, 2020/11/23
- Re: groff: grops and grodvi crash on invalid input, Dave Kemper, 2020/11/23
- Re: Bug#421437: groff: grops and grodvi crash on invalid input, brian m. carlson, 2020/11/22
- Re: Bug#421437: groff: grops and grodvi crash on invalid input, G. Branden Robinson, 2020/11/30