[pcre-dev] [Bug 1018] Stack overflow

Góra strony
Delete this message
Autor: Philip Hazel
Data:  
Dla: pcre-dev
Stare tematy: [pcre-dev] [Bug 1018] New: Stack overflow (not buffer overflow)
Temat: [pcre-dev] [Bug 1018] Stack overflow
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1018

Philip Hazel <ph10@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID





--- Comment #1 from Philip Hazel <ph10@???> 2010-09-08 11:42:25 ---
Many "simple" pattern matches can trigger stack overflows in PCRE. Have you
read the "pcrestack" documentation page? This explains in detail how easy it is
to write a pattern that makes PCRE search a very large tree of possibilities.
Remembering data for backtracking can chew up the stack very quickly. Your
pattern is creating a "remember point" for every character. This issue gets
brought up as a "bug" about twice a year.

Having said that, although I can reproduce your segfault using "grep -P", I
cannot do so using the latest release of pcregrep (8.10), which just matches
every line in the file. This is probably because the two programs call the PCRE
library in different ways, handing it different lengths of strings to match
(but I am guessing here).

Either way, I do not believe this is a bug in PCRE. Rather, it is a limitation,
so I am closing this item. You are, of course, free to re-open if you think I
have got this wrong.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email