From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id 859bc32b for ; Mon, 3 Jun 2019 12:01:19 -0500 (EST) Received: by mail-qk1-f179.google.com with SMTP id t64so895785qkh.1 for ; Mon, 03 Jun 2019 10:01:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uguh8RGiKGacyRjRKLPgR4LRuPhgolETPhZpAuhFFhA=; b=tuIOpr0Iy4/QSXT69QKQEBV8lqBUvvi7U5eCPaHwnZvlurlD5lZMeFqXguDS5Mci3y GgixDaRNTMOl+qDr+iqM2TiMsLFW5dSA4zWb9IsefOSuPOJf0Vy5tTzkbOT21ec5zlmo RnnQN196aV1Av+QT4HxSQFvlV8gMzlDdwKJpDo+vPiDQsZtv4JIHmkqerbVSGleL51QT HpGW1HkojTxEaJS4bV2B8FcorWQaxYMxT1vosO2uW4KzrnXj7OZJnDG3cImtXjJaLYuv Hn4/QmsmrgnX96Waxp6tFsX49Dwe7XpI5WfIoAhtzvs27zNOjld0hRgDxiETSzmQttEe xuYg== X-Gm-Message-State: APjAAAXvVUiqMNMLN4Fo3VoHamAVP7wJboknTc1BcPBQ4Ml40+vkxxx+ RxKP6uErTDXQcvFsSBgpKiLYF4hW6beR6Oz7j2CRDQ== X-Google-Smtp-Source: APXvYqxglXfThUMIaxoEJ5fem/nJnATD0+BJ03pvtye67U1Mp0Hbg/QlJ7bS6M/Q8FhRiVfqf0IV5vza5XSMsddQdHA= X-Received: by 2002:a37:670e:: with SMTP id b14mr22251854qkc.216.1559581278411; Mon, 03 Jun 2019 10:01:18 -0700 (PDT) X-Mailinglist: mandoc-discuss Reply-To: discuss@mandoc.bsd.lv MIME-Version: 1.0 References: <20190310113237.GE23000@athene.usta.de> <20190430160827.GG37599@athene.usta.de> <20190601191656.GC50352@athene.usta.de> In-Reply-To: <20190601191656.GC50352@athene.usta.de> From: Michael Stapelberg Date: Mon, 3 Jun 2019 19:01:07 +0200 Message-ID: Subject: Re: mandoc-1.14.5 released To: Ingo Schwarze Cc: discuss@mandoc.bsd.lv Content-Type: multipart/alternative; boundary="0000000000001930c7058a6e5028" --0000000000001930c7058a6e5028 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Indeed, I can confirm that with that patch applied, all our pages seem to render fine. Could you please do a bugfix release with those patches if you get a chance= ? On Sat, Jun 1, 2019 at 9:17 PM Ingo Schwarze wrote: > Hi Michael, > > thanks again for reporting. > > Michael Stapelberg wrote on Mon, May 27, 2019 at 08:34:21AM +0200: > > > I have encountered one more issue: > > > > % curl -s > > https://manpages.debian.org/testing/mysql-server-5.6/mysqlbinlog.1.en.g= z > | > > ./mandoc -Thtml > > [=E2=80=A6] > > free(): invalid pointer > > > > Could you take a look at that, too, please? > > I believe that problem was already fixed with this commit: > > 2019-03-29 21:27 schwarze > > Changed: > out.c (1.78), "Exp", lines: +2 -2 > > Set the maximum column index in a tbl(7) to the maximum *right* > edge of any cell span, not to the maximum *left* edge, which may = be > smaller if the last column of the table is only reached by > horizontal spans, but not by any regular cell in any row of the > table. Otherwise, the algorithm calculating column widths access= ed > memomy after the end of the colwidth[] array, while it was trying > to handle the rightmost column(s). > > Crash reported by Jason Thorpe via > https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=3D5406= 9 > and via Thomas Klausner (wiz@). Christos@ Zoulas sent a (correct= , > but slightly confusing) patch. The patch i'm committing here is > easier to understand. > > Could you please cross-check whether that patch (appended below) > resolves the problem for you? > > Thanks, > Ingo > > > > Index: out.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/cvs/mandoc/mandoc/out.c,v > retrieving revision 1.77 > diff -u -p -r1.77 out.c > --- out.c 13 Dec 2018 11:55:47 -0000 1.77 > +++ out.c 1 Jun 2019 19:14:23 -0000 > @@ -1,4 +1,4 @@ > -/* $Id: out.c,v 1.77 2018/12/13 11:55:47 schwarze Exp $ */ > +/* $Id: out.c,v 1.78 2019/03/29 21:27:06 schwarze Exp $ */ > /* > * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons > * Copyright (c) 2011,2014,2015,2017,2018 Ingo Schwarze < > schwarze@openbsd.org> > @@ -149,7 +149,7 @@ tblcalc(struct rofftbl *tbl, const struc > gp =3D &first_group; > for (dp =3D sp->first; dp !=3D NULL; dp =3D dp->next) { > icol =3D dp->layout->col; > - while (icol > maxcol) > + while (maxcol < icol + dp->hspans) > tbl->cols[++maxcol].spacing =3D SIZE_MAX; > col =3D tbl->cols + icol; > col->flags |=3D dp->layout->flags; > --=20 Best regards, Michael --0000000000001930c7058a6e5028 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Indeed, I can confirm that with that patch applied, all ou= r pages seem to render fine.

Could you please do a bugfi= x release with those patches if you get a chance?

On Sat, Jun 1, 2019 = at 9:17 PM Ingo Schwarze <schwarze@u= sta.de> wrote:
Hi Michael,

thanks again for reporting.

Michael Stapelberg wrote on Mon, May 27, 2019 at 08:34:21AM +0200:

> I have encountered one more issue:
>
> % curl -s
> https://manpages.debian= .org/testing/mysql-server-5.6/mysqlbinlog.1.en.gz |
> ./mandoc -Thtml
> [=E2=80=A6]
> free(): invalid pointer
>
> Could you take a look at that, too, please?

I believe that problem was already fixed with this commit:

=C2=A0 =C2=A02019-03-29 21:27=C2=A0 schwarze

=C2=A0 =C2=A0 =C2=A0 =C2=A0 Changed:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 out.c (1.78), "= ;Exp", lines: +2 -2

=C2=A0 =C2=A0 =C2=A0 =C2=A0 Set the maximum column index in a tbl(7) to the= maximum *right*
=C2=A0 =C2=A0 =C2=A0 =C2=A0 edge of any cell span, not to the maximum *left= * edge, which may be
=C2=A0 =C2=A0 =C2=A0 =C2=A0 smaller if the last column of the table is only= reached by
=C2=A0 =C2=A0 =C2=A0 =C2=A0 horizontal spans, but not by any regular cell i= n any row of the
=C2=A0 =C2=A0 =C2=A0 =C2=A0 table.=C2=A0 Otherwise, the algorithm calculati= ng column widths accessed
=C2=A0 =C2=A0 =C2=A0 =C2=A0 memomy after the end of the colwidth[] array, w= hile it was trying
=C2=A0 =C2=A0 =C2=A0 =C2=A0 to handle the rightmost column(s).

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Crash reported by J= ason Thorpe <thorpej at NetBSD> via
=C2=A0 =C2=A0 =C2=A0 =C2=A0 https:= //gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=3D54069
=C2=A0 =C2=A0 =C2=A0 =C2=A0 and via Thomas Klausner (wiz@).=C2=A0 Christos@= Zoulas sent a (correct,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 but slightly confusing) patch.=C2=A0 The patch = i'm committing here is
=C2=A0 =C2=A0 =C2=A0 =C2=A0 easier to understand.

Could you please cross-check whether that patch (appended below)
resolves the problem for you?

Thanks,
=C2=A0 Ingo



Index: out.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/cvs/mandoc/mandoc/out.c,v
retrieving revision 1.77
diff -u -p -r1.77 out.c
--- out.c=C2=A0 =C2=A0 =C2=A0 =C2=A013 Dec 2018 11:55:47 -0000=C2=A0 =C2=A0= =C2=A0 1.77
+++ out.c=C2=A0 =C2=A0 =C2=A0 =C2=A01 Jun 2019 19:14:23 -0000
@@ -1,4 +1,4 @@
-/*=C2=A0 =C2=A0 =C2=A0$Id: out.c,v 1.77 2018/12/13 11:55:47 schwarze Exp $= */
+/*=C2=A0 =C2=A0 =C2=A0$Id: out.c,v 1.78 2019/03/29 21:27:06 schwarze Exp $= */
=C2=A0/*
=C2=A0 * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
=C2=A0 * Copyright (c) 2011,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org= >
@@ -149,7 +149,7 @@ tblcalc(struct rofftbl *tbl, const struc
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 gp =3D &first_g= roup;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 for (dp =3D sp->= first; dp !=3D NULL; dp =3D dp->next) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 icol =3D dp->layout->col;
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0while (icol > maxcol)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0while (maxcol < icol + dp->hspans)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 tbl->cols[++maxcol].spacing =3D S= IZE_MAX;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 col =3D tbl->cols + icol;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 col->flags |=3D dp->layout->flags;


--
Best regards,
Michael
--0000000000001930c7058a6e5028-- -- To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv