From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp1.rz.uni-karlsruhe.de (Debian-exim@smtp1.rz.uni-karlsruhe.de [129.13.185.217]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id oB2MoO5o020740 for ; Thu, 2 Dec 2010 17:50:25 -0500 (EST) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by smtp1.rz.uni-karlsruhe.de with esmtp (Exim 4.63 #1) id 1POHym-0007lR-HY; Thu, 02 Dec 2010 23:50:20 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1POHym-0008Jz-FI for tech@mdocml.bsd.lv; Thu, 02 Dec 2010 23:50:20 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.69) (envelope-from ) id 1POHym-0007Jp-Db for tech@mdocml.bsd.lv; Thu, 02 Dec 2010 23:50:20 +0100 Received: from schwarze by usta.de with local (Exim 4.72) (envelope-from ) id 1POHym-0004xc-6M for tech@mdocml.bsd.lv; Thu, 02 Dec 2010 23:50:20 +0100 Date: Thu, 2 Dec 2010 23:50:19 +0100 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: Re: roff.c question Message-ID: <20101202225019.GD12188@iris.usta.de> References: <4CF678F0.6020304@bsd.lv> <20101201212834.GA22990@iris.usta.de> <4CF77A2B.6020702@bsd.lv> <4CF79F45.6080105@bsd.lv> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CF79F45.6080105@bsd.lv> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Kristaps, Kristaps Dzonsons wrote on Thu, Dec 02, 2010 at 02:29:41PM +0100: > The groff_char.man page causes the blow-up (enclosed). Typical GNU sabotage. ;-( Did you look at that code? Take a seat first, lest you fall. But seriously, how do you expect the following code to behave? .ds CH \\*[CH] \*(CH Here is what groff does: EXAMPLES/loop.in:8: fatal error: input stack limit exceeded (probable infinite loop) Apparently, the groff_char manual does not actually dereference this self-referencing string, but the macro and if constructs are so complicated that i guess i would need quite some time to disentangle them and understand the reason. In any case, this is all way above mandoc's head. Young mandoc simply evaluates almost all conditions to false - and runs straight into the trap. I see two things this we can do here: 1) roff_res() should not expand \\* or \\\\*, but it should expand \* and \\\*. 2) We should implement some kind of stack limit and just bail out. Planning to look into that tomorrow... Yours, Ingo -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv