From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout-kit-02.scc.kit.edu (scc-mailout-kit-02.scc.kit.edu [129.13.231.82]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id ee77b87f for ; Sat, 13 May 2017 08:47:56 -0500 (EST) Received: from asta-nat.asta.uni-karlsruhe.de ([172.22.63.82] helo=hekate.usta.de) by scc-mailout-kit-02.scc.kit.edu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (envelope-from ) id 1d9XOk-0003hK-M4; Sat, 13 May 2017 15:47:55 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1d9XOj-0003wr-TZ; Sat, 13 May 2017 15:47:53 +0200 Received: from athene.usta.de ([172.24.96.10]) by donnerwolke.usta.de with esmtp (Exim 4.84_2) (envelope-from ) id 1d9XOj-0002Ya-Oq; Sat, 13 May 2017 15:47:53 +0200 Received: from localhost (athene.usta.de [local]) by athene.usta.de (OpenSMTPD) with ESMTPA id 17d54d18; Sat, 13 May 2017 15:47:53 +0200 (CEST) Date: Sat, 13 May 2017 15:47:53 +0200 From: Ingo Schwarze To: Abhinav Upadhyay Cc: discuss@mdocml.bsd.lv Subject: Re: mandoc -Thtml crashing for certain inputs Message-ID: <20170513134753.GA89951@athene.usta.de> References: X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.2 (2016-07-01) Hi Abhinav, Abhinav Upadhyay wrote on Sat, May 13, 2017 at 06:36:53PM +0530: > mandoc -Thtml seems to be crashing in some cases, when you pass the > -Ostyle option to it, such as `mandoc -Thtml -Ostyle=s/style.css'. > > The core indicates a null pointer dereference at line 754 in > mdoc_html.c (1.14.1 release): > > if (h->style != NULL && !bl->norm->Bl.comp && > (n->parent->prev == NULL || > n->parent->prev->body->child != NULL)) { > ... > > I am able to hit it with the following test case: > > .Dd May 13, 2017 > .Dt FOO 8 > .Os > .Sh NAME > .Nm foo > .Nd man page for foo > .Sh DESCRIPTION > foo bar > .Bl -tag -width Ds > .Sm off > .It Ar device > Open the specified device > .El > > It crashes because of the presence of `.Sm off' inside the list. The > actual issue was happening while generating html for the rmt(8) man > page from FreeBSD-12.0-current but I tried to reduce it down to a > smaller test case for ease of debugging. That crash was first reported by Gabriel Guzman and i fixed it in mdoc_html.c rev. 1.272 on Feb 22, 2017. The HEAD revision of that file currently is rev. 1.287. Yours, Ingo -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv