[pcre-dev] [Bug 869] Unreasonable recursion caused by two ne…

Page principale
Supprimer ce message
Auteur: Philip Hazel
Date:  
À: pcre-dev
Sujet: [pcre-dev] [Bug 869] Unreasonable recursion caused by two nested groups
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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




--- Comment #7 from Philip Hazel <ph10@???> 2009-08-04 18:22:03 ---
On Tue, 4 Aug 2009, John Smith wrote:

> > but how would using the heap help? There could still be an
> > "insufficient resources" error if the heap ran out.
>
> Well, I believe the size of the stack is many times smaller than the
> total free memory. Hence, the maximum recursion limit (before the
> given resource is exhausted) should be much lower if you use stack.


Ah, OK, it's as simple as that. I never realized (before this problem
reared its head some years ago, causing the invention of the "use heap"
facility) that stacks had a fixed size in Linux/Unix (which I was
writing for), and I never thought about Windows at all when I was
creating PCRE. In a previous environment I was used to the stack growing
from the heap as much as it liked, so the limit was "overall memory";
mind you, in an age where gigabyte memories are common, limiting the
stack to 8Mb, as some environments do, at least by default, does seem a
bit mean. I am actually of an age where gigabyte memories still seem
utterly enormous. I can remember when one *mega*byte was a huge amount
of memory....

Philip


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