From unknown Mon Jun 23 00:36:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13802: stack overflow in mm-add-meta-html-tag Resent-From: Thien-Thi Nguyen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Feb 2013 09:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13802 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 13802@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.136169746918603 (code B ref -1); Sun, 24 Feb 2013 09:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Feb 2013 09:17:49 +0000 Received: from localhost ([127.0.0.1]:46623 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U9XiP-0004q0-AG for submit@debbugs.gnu.org; Sun, 24 Feb 2013 04:17:49 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51241) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U9XiN-0004pt-1Y for submit@debbugs.gnu.org; Sun, 24 Feb 2013 04:17:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9Xgq-0003Em-Rd for submit@debbugs.gnu.org; Sun, 24 Feb 2013 04:16:14 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:57265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9Xgq-0003Ei-Nj for submit@debbugs.gnu.org; Sun, 24 Feb 2013 04:16:12 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9Xgp-0004QI-1F for bug-gnu-emacs@gnu.org; Sun, 24 Feb 2013 04:16:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9Xgl-0003Cp-Va for bug-gnu-emacs@gnu.org; Sun, 24 Feb 2013 04:16:10 -0500 Received: from smtp206.alice.it ([82.57.200.102]:49881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9Xgl-0003CN-Ky for bug-gnu-emacs@gnu.org; Sun, 24 Feb 2013 04:16:07 -0500 Received: from zigzag.favinet (79.21.51.130) by smtp206.alice.it (8.6.060.15) id 511D120D016B82E7 for bug-gnu-emacs@gnu.org; Sun, 24 Feb 2013 10:16:06 +0100 Received: from ttn by zigzag.favinet with local (Exim 4.72) (envelope-from ) id 1U9Xih-0008J4-0S for bug-gnu-emacs@gnu.org; Sun, 24 Feb 2013 10:18:07 +0100 From: Thien-Thi Nguyen Date: Sun, 24 Feb 2013 10:17:53 +0100 Message-ID: <87wqtyrry6.fsf@zigzag.favinet> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I see a "Stack overflow in regexp matcher" error traceable back to lisp/gnus/mm-decode.el func =E2=80=98mm-add-meta-html-tag=E2=80=99 fragment: (re-search-forward "\ ]*>" nil t) To allow the user (not me) to continue, i kludged the form to be: (ignore-errors (re-search-forward "..." nil t)) that is, wrapping w/ =E2=80=98ignore-errors=E2=80=99. Is there a better so= lution? One idea (untested) is to replace the ".+" (used to match the charset) with a more specific pattern. Perhaps "[^<>]+" or "\\sw+"? Thinking more systematically, maybe Emacs should add a condition =E2=80=98stack-overflow/regexp=E2=80=99 (or something like that) such that = code can =E2=80=98condition-case=E2=80=99 for it and try a fallback path. =2D-=20 Thien-Thi Nguyen ..................................... GPG key: 4C807502 . NB: ttn at glug dot org is not me . . (and has not been since 2007 or so) . . ACCEPT NO SUBSTITUTES . ........... please send technical questions to mailing lists ........... --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAlEp2scACgkQZwMiJEyAdQLC7wCeIjVXhARfEqtpJzx7wLCYbW43 O7wAoLKBgInJuTLFOrjo8KxCdioq4xzC =mDNu -----END PGP SIGNATURE----- --=-=-=-- From unknown Mon Jun 23 00:36:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13802: stack overflow in mm-add-meta-html-tag Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Mon, 25 Feb 2013 00:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13802 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Thien-Thi Nguyen Cc: 13802@debbugs.gnu.org Received: via spool by 13802-submit@debbugs.gnu.org id=B13802.136175254213363 (code B ref 13802); Mon, 25 Feb 2013 00:36:01 +0000 Received: (at 13802) by debbugs.gnu.org; 25 Feb 2013 00:35:42 +0000 Received: from localhost ([127.0.0.1]:48358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U9m2g-0003TU-HW for submit@debbugs.gnu.org; Sun, 24 Feb 2013 19:35:42 -0500 Received: from ps18281.dreamhost.com ([69.163.218.105]:35503 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U9m2M-0003T3-Ag for 13802@debbugs.gnu.org; Sun, 24 Feb 2013 19:35:41 -0500 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id B3735258B92902; Sun, 24 Feb 2013 16:33:44 -0800 (PST) From: Juri Linkov Organization: JURTA References: <87wqtyrry6.fsf@zigzag.favinet> Date: Mon, 25 Feb 2013 02:20:39 +0200 In-Reply-To: <87wqtyrry6.fsf@zigzag.favinet> (Thien-Thi Nguyen's message of "Sun, 24 Feb 2013 10:17:53 +0100") Message-ID: <87y5edmdxw.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.0 (/) > I see a "Stack overflow in regexp matcher" error traceable back to > lisp/gnus/mm-decode.el func =E2=80=98mm-add-meta-html-tag=E2=80=99 frag= ment: > > (re-search-forward "\ > text/\\(\\sw+\\)\\(?:\;\\s-*charset=3D\\(.+\\)\\)?[\"'][^>]*>" nil t) > > To allow the user (not me) to continue, i kludged the form to be: > > (ignore-errors > (re-search-forward "..." nil t)) > > that is, wrapping w/ =E2=80=98ignore-errors=E2=80=99. Is there a bette= r solution? `sgml-html-meta-auto-coding-function' uses a similar regexp that doesn't fail with stack overflow. You could get some ideas from this regexp and sync the regexp in `mm-add-meta-html-tag' with it. From unknown Mon Jun 23 00:36:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13802: stack overflow in mm-add-meta-html-tag Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Mon, 25 Feb 2013 02:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13802 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Thien-Thi Nguyen Cc: 13802@debbugs.gnu.org Received: via spool by 13802-submit@debbugs.gnu.org id=B13802.136175796128553 (code B ref 13802); Mon, 25 Feb 2013 02:06:02 +0000 Received: (at 13802) by debbugs.gnu.org; 25 Feb 2013 02:06:01 +0000 Received: from localhost ([127.0.0.1]:48440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U9nS5-0007QS-8j for submit@debbugs.gnu.org; Sun, 24 Feb 2013 21:06:01 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:40981) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U9nS3-0007QK-NH for 13802@debbugs.gnu.org; Sun, 24 Feb 2013 21:05:59 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+KLv/2dsb2JhbABEhke4Rxdzgh4BAQQBIzMjBQsLGgIYDgICFBgNJIgeBq5fkk6BI45UgRMDiGGcGYFegxU X-IPAS-Result: Av8EABK/CFHO+KLv/2dsb2JhbABEhke4Rxdzgh4BAQQBIzMjBQsLGgIYDgICFBgNJIgeBq5fkk6BI45UgRMDiGGcGYFegxU X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="2234486" Received: from 206-248-162-239.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([206.248.162.239]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Feb 2013 21:04:21 -0500 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id E7B44AE2C6; Sun, 24 Feb 2013 21:04:21 -0500 (EST) From: Stefan Monnier Message-ID: References: <87wqtyrry6.fsf@zigzag.favinet> Date: Sun, 24 Feb 2013 21:04:21 -0500 In-Reply-To: <87wqtyrry6.fsf@zigzag.favinet> (Thien-Thi Nguyen's message of "Sun, 24 Feb 2013 10:17:53 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.0 (/) > I see a "Stack overflow in regexp matcher" error traceable back to > lisp/gnus/mm-decode.el func =E2=80=98mm-add-meta-html-tag=E2=80=99 fragme= nt: > (re-search-forward "\ > text/\\(\\sw+\\)\\(?:\;\\s-*charset=3D\\(.+\\)\\)?[\"'][^>]*>" nil t) Hmm... I don't see any obvious reason for a stack overflow unless the text has some very long lines or a lot of space between elements. > One idea (untested) is to replace the ".+" (used to match the charset) > with a more specific pattern. Perhaps "[^<>]+" or "\\sw+"? I don't think that would help. To avoid such overflow, you need to reduce the backtracking, i.e. reduce the number of cases where two options are possible according to the simplistic regexp-optimizer. \s pattern is actually very poor in this respect, because the optimizer can't know anything about the chars that this matches (since it depends on text-properties). The flip side is that replacing \\s- with [ \t\n] might help (this way, the optimizer will see that the + repetition does not need backtracking since a char cannot both match a loop iteration and the "after the loop" content). Similarly using [^;'\"]+ instead of \\sw+ would help, and maybe replacing .+ with [^'\"\n]+ would help as well. > Thinking more systematically, maybe Emacs should add a condition > =E2=80=98stack-overflow/regexp=E2=80=99 (or something like that) such tha= t code can > =E2=80=98condition-case=E2=80=99 for it and try a fallback path. In reality, such overflow should only ever happen if you have backrefs in your regexp. Stefan From unknown Mon Jun 23 00:36:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13802: stack overflow in mm-add-meta-html-tag Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Sat, 06 Jul 2013 16:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13802 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Thien-Thi Nguyen Cc: 13802@debbugs.gnu.org Received: via spool by 13802-submit@debbugs.gnu.org id=B13802.137312708622437 (code B ref 13802); Sat, 06 Jul 2013 16:12:02 +0000 Received: (at 13802) by debbugs.gnu.org; 6 Jul 2013 16:11:26 +0000 Received: from localhost ([127.0.0.1]:34882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UvV53-0005pn-6R for submit@debbugs.gnu.org; Sat, 06 Jul 2013 12:11:25 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:43243) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UvV51-0005pe-DS for 13802@debbugs.gnu.org; Sat, 06 Jul 2013 12:11:23 -0400 Received: from 46.157.223.218.tmi.telenormobil.no ([46.157.223.218] helo=building.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UvV4q-0002OM-EE; Sat, 06 Jul 2013 18:11:12 +0200 From: Lars Ingebrigtsen References: <87wqtyrry6.fsf@zigzag.favinet> Date: Sat, 06 Jul 2013 18:11:00 +0200 In-Reply-To: <87wqtyrry6.fsf@zigzag.favinet> (Thien-Thi Nguyen's message of "Sun, 24 Feb 2013 10:17:53 +0100") Message-ID: <87r4fbwtwr.fsf@building.gnus.org> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-MailScanner-ID: 1UvV4q-0002OM-EE X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1373731872.69649@HM/aKKsJMoVBaY0tLSp+tQ X-Spam-Status: No X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Thien-Thi Nguyen writes: > I see a "Stack overflow in regexp matcher" error traceable back to > lisp/gnus/mm-decode.el func =91mm-add-meta-html-tag=92 fragment: > > (re-search-forward "\ > text/\\(\\sw+\\)\\(?:\;\\s-*charset=3D\\(.+\\)\\)?[\"'][^>]*>" nil t) Do you know what text it is that triggers this bug? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From unknown Mon Jun 23 00:36:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13802: stack overflow in mm-add-meta-html-tag Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Fri, 31 Jan 2014 00:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13802 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Juri Linkov Cc: Thien-Thi Nguyen , 13802@debbugs.gnu.org Received: via spool by 13802-submit@debbugs.gnu.org id=B13802.13911287974892 (code B ref 13802); Fri, 31 Jan 2014 00:40:01 +0000 Received: (at 13802) by debbugs.gnu.org; 31 Jan 2014 00:39:57 +0000 Received: from localhost ([127.0.0.1]:42020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W929E-0001Gq-G8 for submit@debbugs.gnu.org; Thu, 30 Jan 2014 19:39:56 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:59370) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W929B-0001Gh-Uc for 13802@debbugs.gnu.org; Thu, 30 Jan 2014 19:39:54 -0500 Received: from [204.14.154.233] (helo=building.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1W928w-000337-Om; Fri, 31 Jan 2014 01:39:39 +0100 From: Lars Ingebrigtsen References: <87wqtyrry6.fsf@zigzag.favinet> <87y5edmdxw.fsf@mail.jurta.org> Date: Thu, 30 Jan 2014 16:38:49 -0800 In-Reply-To: <87y5edmdxw.fsf@mail.jurta.org> (Juri Linkov's message of "Mon, 25 Feb 2013 02:20:39 +0200") Message-ID: <8761p17zom.fsf@building.gnus.org> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-MailScanner-ID: 1W928w-000337-Om X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1391733579.83931@y8rPTrrzG1i9ckXVJhDyiw X-Spam-Status: No X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Juri Linkov writes: >> I see a "Stack overflow in regexp matcher" error traceable back to >> lisp/gnus/mm-decode.el func =91mm-add-meta-html-tag=92 fragment: >> >> (re-search-forward "\ >> > text/\\(\\sw+\\)\\(?:\;\\s-*charset=3D\\(.+\\)\\)?[\"'][^>]*>" nil t) >> >> To allow the user (not me) to continue, i kludged the form to be: >> >> (ignore-errors >> (re-search-forward "..." nil t)) >> >> that is, wrapping w/ =91ignore-errors=92. Is there a better solution? > > `sgml-html-meta-auto-coding-function' uses a similar regexp > that doesn't fail with stack overflow. You could get some ideas > from this regexp and sync the regexp in `mm-add-meta-html-tag' with it. I've adapted the regexp from that function in the patch below, but since I don't have a test case, I'm not really sure about committing it. Thien-Thi, could you post the message that triggers this error, or the relevant bits of it? diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index 17c8fb1..eaf9de4 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -1405,9 +1405,7 @@ Return t if meta tag is added or replaced." = " charset)) (let ((case-fold-search t)) (goto-char (point-min)) - (if (re-search-forward "\ -]+\\)\\)?[^>]*>" nil t) + (if (re-search-forward "]" nil t) (if (and (not force-charset) (match-beginning 2) (string-match "\\`html\\'" (match-string 1))) --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From unknown Mon Jun 23 00:36:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13802: stack overflow in mm-add-meta-html-tag Resent-From: Thien-Thi Nguyen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Fri, 31 Jan 2014 06:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13802 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: Juri Linkov , 13802@debbugs.gnu.org Received: via spool by 13802-submit@debbugs.gnu.org id=B13802.139114842420704 (code B ref 13802); Fri, 31 Jan 2014 06:08:02 +0000 Received: (at 13802) by debbugs.gnu.org; 31 Jan 2014 06:07:04 +0000 Received: from localhost ([127.0.0.1]:42203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W97Fj-0005Mt-Qu for submit@debbugs.gnu.org; Fri, 31 Jan 2014 01:07:03 -0500 Received: from smtp206.alice.it ([82.57.200.102]:41454) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W97Fd-0005Mb-DB for 13802@debbugs.gnu.org; Fri, 31 Jan 2014 01:06:57 -0500 Received: from zigzag.favinet (95.236.70.193) by smtp206.alice.it (8.6.060.28) id 529A678F0CF89E52; Fri, 31 Jan 2014 07:06:44 +0100 Received: from ttn by zigzag.favinet with local (Exim 4.80) (envelope-from ) id 1W97JI-0001pa-HJ; Fri, 31 Jan 2014 07:10:40 +0100 From: Thien-Thi Nguyen References: <87wqtyrry6.fsf@zigzag.favinet> <87y5edmdxw.fsf@mail.jurta.org> <8761p17zom.fsf@building.gnus.org> Date: Fri, 31 Jan 2014 07:10:28 +0100 In-Reply-To: <8761p17zom.fsf@building.gnus.org> (Lars Ingebrigtsen's message of "Thu, 30 Jan 2014 16:38:49 -0800") Message-ID: <8761p0d6ln.fsf@zigzag.favinet> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable () Lars Ingebrigtsen () Thu, 30 Jan 2014 16:38:49 -0800 Juri Linkov writes: > `sgml-html-meta-auto-coding-function' uses a similar regexp that > doesn't fail with stack overflow. You could get some ideas from > this regexp and sync the regexp in `mm-add-meta-html-tag' with it. I've adapted the regexp from that function in the patch below, but since I don't have a test case, I'm not really sure about committing it. Thien-Thi, could you post the message that triggers this error, or the relevant bits of it? I'd like to, but no longer have immediate access to that particular message -- it might take a day or two to excavate (if at all). However, i do remember it was all on one line (no newlines, machine generated). diff [...] - ORIGINAL-HAIRY-REGEXP + ANOTER-HAIRY-REGEXP Maybe this would be a good time to substitute a symbolic regexp? =2D-=20 Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) =3D> nil --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlLrPlcACgkQZwMiJEyAdQLKcwCgjesrOEVfBqNey9pkBQ9jDrzy HTgAn2lUpQWUALVhtniw3D67T7dyfMf5 =SR4Q -----END PGP SIGNATURE----- --=-=-=-- From unknown Mon Jun 23 00:36:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13802: stack overflow in mm-add-meta-html-tag Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Tue, 01 Mar 2016 14:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13802 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: To: Juri Linkov Cc: 13802@debbugs.gnu.org, Thien-Thi Nguyen Received: via spool by 13802-submit@debbugs.gnu.org id=B13802.1456841630614 (code B ref 13802); Tue, 01 Mar 2016 14:14:02 +0000 Received: (at 13802) by debbugs.gnu.org; 1 Mar 2016 14:13:50 +0000 Received: from localhost ([127.0.0.1]:54852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aal3d-00009o-Hu for submit@debbugs.gnu.org; Tue, 01 Mar 2016 09:13:50 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:59574) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aal3Y-00009S-DO for 13802@debbugs.gnu.org; Tue, 01 Mar 2016 09:13:48 -0500 Received: from 2.151.173.136.tmi.telenormobil.no ([2.151.173.136] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aal33-0005oA-2k; Tue, 01 Mar 2016 15:13:13 +0100 From: Lars Ingebrigtsen In-Reply-To: <8761p17zom.fsf@building.gnus.org> (Lars Ingebrigtsen's message of "Thu, 30 Jan 2014 16:38:49 -0800") Date: Tue, 01 Mar 2016 16:58:27 +1100 Message-ID: <87d1reviws.fsf@gnus.org> References: <87wqtyrry6.fsf@zigzag.favinet> <87y5edmdxw.fsf@mail.jurta.org> <8761p17zom.fsf@building.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1aal33-0005oA-2k X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1457446393.88286@RpohD2Ljul0BxIw0J+VBxg X-Spam-Status: No X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Lars Ingebrigtsen writes: > I've adapted the regexp from that function in the patch below, but since > I don't have a test case, I'm not really sure about committing it. > > Thien-Thi, could you post the message that triggers this error, or the > relevant bits of it? [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.91.224.195 listed in list.dnswl.org] 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Lars Ingebrigtsen writes: > I've adapted the regexp from that function in the patch below, but since > I don't have a test case, I'm not really sure about committing it. > > Thien-Thi, could you post the message that triggers this error, or the > relevant bits of it? [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.91.224.195 listed in list.dnswl.org] 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date Lars Ingebrigtsen writes: > I've adapted the regexp from that function in the patch below, but since > I don't have a test case, I'm not really sure about committing it. > > Thien-Thi, could you post the message that triggers this error, or the > relevant bits of it? [...] > - (if (re-search-forward "\ > - -text/\\(\\sw+\\)\\(?:\;\\s-*charset=\\([^\"'>]+\\)\\)?[^>]*>" nil t) > + (if (re-search-forward "]" nil t) > (if (and (not force-charset) Since we have no test case for this, and I haven't seen any other reports in this area, I'm not applying my patch, and I'm closing this report. If you see this again, please reopen. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 01 09:13:50 2016 Received: (at control) by debbugs.gnu.org; 1 Mar 2016 14:13:51 +0000 Received: from localhost ([127.0.0.1]:54854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aal3e-00009r-Nd for submit@debbugs.gnu.org; Tue, 01 Mar 2016 09:13:50 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:59583) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aal3c-00009X-3O for control@debbugs.gnu.org; Tue, 01 Mar 2016 09:13:48 -0500 Received: from 2.151.173.136.tmi.telenormobil.no ([2.151.173.136] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aal37-0005oM-GZ for control@debbugs.gnu.org; Tue, 01 Mar 2016 15:13:18 +0100 From: Lars Ingebrigtsen To: control@debbugs.gnu.org Subject: control message for bug #13802 Message-ID: <87bn6yviwo.fsf@totally-fudged-out-message-id> Date: Wed, 02 Mar 2016 01:13:14 +1100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aal37-0005oM-GZ X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1457446398.47507@njQrWhAiF8DuxtZIxHd8XQ X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) close 13802