From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Sat, 11 Sep 2010 18:15:45 -0400 Message-ID: Subject: Re: [9fans] email header screwup (and fix) From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: 54a06e5e-ead6-11e9-9d60-3106f5b1d025 On Thu, Sep 9, 2010 at 4:13 PM, erik quanstrom wrot= e: > lately, i've been seeing email with gigantic headers. > 120 header lines are not that uncommon. =C2=A0unfortunately > upas has sometimes inserts a blank line about > (but not exactly) 4k into the file. =C2=A0a bit of digging, upas/send > was assuming that if yacc didn't stop at a blank line, one should > be inserted. unfortunately, yacc was stopping because it ran out of stack > space. =C2=A0the hack is to increase YYMAXDEPTH. =C2=A0ideally, > each line should be parsed independently, thus making > yacc's depth depend only on the complexity of a line. or change the grammar not to need unlimited stack space. it says fields : '\n' { yydone =3D 1; } | field '\n' | field '\n' fields ; but i think you can change it to fields : fieldlist '\n' { yydone =3D 1; } ; fieldlist : | fieldlist field '\n' ; russ