Gnus development mailing list
 help / color / mirror / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: Dave Abrahams <dave@boostpro.com>
Cc: ding@gnus.org,  John Wiegley <johnw@boostpro.com>
Subject: Re: [Workaround/Solved] This bug is killing me!
Date: Tue, 30 Aug 2011 20:17:39 +0200	[thread overview]
Message-ID: <8739giahmk.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: <m2sjoiydoh.fsf@boostpro.com> (Dave Abrahams's message of "Tue, 30 Aug 2011 10:09:02 -0800")

Dave Abrahams <dave@boostpro.com> writes:

>>> I have this additional change, which avoids pathological regexp
>>> behavior:
>>>
>>> diff --git a/lisp/nnimap.el b/lisp/nnimap.el
>>> index 2dbc465..5b7d253 100644
>>> --- a/lisp/nnimap.el
>>> +++ b/lisp/nnimap.el
>>> @@ -190,7 +190,7 @@ textual parts.")
>>>    (let (article bytes lines size string)
>>>      (block nil
>>>        (while (not (eobp))
>>> -	(while (not (looking-at "\\* [0-9]+ FETCH.+UID \\([0-9]+\\)"))
>>> +	(while (not (looking-at "\\* [0-9]+ FETCH.+?UID \\([0-9]+\\)"))
>>>  	  (delete-region (point) (progn (forward-line 1) (point)))
>>>  	  (when (eobp)
>>>  	    (return)))
>>
>> Hm, so you use the non-greedy variant of ".+".  That should make a
>> difference only if there a lines like
>>
>>   * 939393 FETCH something here UID 918823 UID 191929
>>
>> i.e. the string UID followed by a number occurs more than once.  
>
> Not necessarily.  On a really long line the original has to search to
> the end before it can accept the match at the beginning, even if the
> string appears only once.  I reported this bug 9 days ago; full details
> are here: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9338

Thanks.  In fact, I can reproduce that stack overflow here.

Bye,
Tassilo



  reply	other threads:[~2011-08-30 18:17 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 21:51 Dave Abrahams
2011-08-30  7:01 ` Tassilo Horn
2011-08-30  9:27   ` Robert Pluim
2011-08-30 10:12     ` Tassilo Horn
2011-08-30  9:33   ` [Workaround/Solved] " Dave Abrahams
2011-08-30 10:18     ` Tassilo Horn
2011-08-30 10:33       ` Dave Abrahams
2011-08-30 11:20         ` Tassilo Horn
2011-08-30 18:09           ` Dave Abrahams
2011-08-30 18:17             ` Tassilo Horn [this message]
2011-09-10 21:59         ` Lars Magne Ingebrigtsen
2011-08-30 10:39       ` Dave Abrahams
2011-08-30 11:50         ` Tassilo Horn
2011-08-30 18:40           ` Dave Abrahams
2011-08-30 15:04     ` James Cloos
2011-08-30 19:02       ` Dave Abrahams
2011-08-30 19:19         ` Tassilo Horn
2011-08-30 19:53           ` Dave Abrahams
2011-08-30 22:07           ` [The saga continues...] " Dave Abrahams
2011-09-10 22:01             ` Lars Magne Ingebrigtsen
2011-08-30 21:36         ` [Workaround/Solved] " James Cloos
2011-08-31  6:40           ` Dave Abrahams
2011-08-31  7:51           ` Tassilo Horn
2011-08-31  8:27             ` James Cloos
2011-08-31 16:51 ` Andrew Cohen
2011-08-31 19:49   ` Dave Abrahams
2011-08-31 20:05     ` Andrew Cohen
2011-09-10 22:01   ` Lars Magne Ingebrigtsen
2011-09-10 22:12     ` Andrew Cohen
2011-09-10 22:11       ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8739giahmk.fsf@thinkpad.tsdh.de \
    --to=tassilo@member.fsf.org \
    --cc=dave@boostpro.com \
    --cc=ding@gnus.org \
    --cc=johnw@boostpro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).