From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-1.sys.kth.se (smtp-1.sys.kth.se [130.237.32.175]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id oB5FI1XV000541 for ; Sun, 5 Dec 2010 10:18:02 -0500 (EST) Received: from mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 8EF5D156F84 for ; Sun, 5 Dec 2010 16:17:56 +0100 (CET) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-1.sys.kth.se ([130.237.32.175]) by mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) (amavisd-new, port 10024) with LMTP id QI0j0jET5dD8 for ; Sun, 5 Dec 2010 16:17:55 +0100 (CET) X-KTH-Auth: kristaps [193.10.49.5] X-KTH-mail-from: kristaps@bsd.lv X-KTH-rcpt-to: tech@mdocml.bsd.lv Received: from [172.16.18.84] (unknown [193.10.49.5]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 902DC1557D3 for ; Sun, 5 Dec 2010 16:17:55 +0100 (CET) Message-ID: <4CFBAD23.1030000@bsd.lv> Date: Sun, 05 Dec 2010 16:17:55 +0100 From: Kristaps Dzonsons User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101030 Icedove/3.0.10 X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 To: tech@mdocml.bsd.lv Subject: Re: roff.c question References: <4CF678F0.6020304@bsd.lv> <20101201212834.GA22990@iris.usta.de> <4CF77A2B.6020702@bsd.lv> <4CF79F45.6080105@bsd.lv> <20101202225019.GD12188@iris.usta.de> <20101203233148.GC28384@iris.usta.de> In-Reply-To: <20101203233148.GC28384@iris.usta.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit >> 2) We should implement some kind of stack limit >> and just bail out. > > OK to commit the following patch, too? > > The constant of 1000 is the same that new groff is using, > and i'm mostly indifferent regarding the question which number > to use. > > > Note though that groff_char.man still puts a terrible strain on mandoc > even with these two patches: > > 9219 lines of output, including > 1416 ERROR: input stack limit exceeded, infinite loop? > 3328 ERROR: skipping unknown macro > 10 other errors and warnings > 4465 lines of completely garbled output on stdout > > On my old, slow test box, mandoc groff_char.man runs > more than two minutes with these two patches. > > But i don't really see the point in trying to improve this. > We won't get anything even semi-sensible out of this input > without implementing full roff. Ingo, this is fine by me---conditional upon (1) making the variable be part of struct roff and not static, and (2) stating the existence of a limit in roff.7. I realise this is putting a lot of technical detail in roff.7 (as per last patch response, too) but I'm really, really sick of groff's crappy, undocumented behaviour and would rather too much than too little. Can you pop an entry into the TODO to the extent that more rigorous checking of looping constructs should be enacted? Thanks again, Ingo! Kristaps -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv