[Tickets #11671] Re: The dynamic view crashes on some Inboxes

bugs at horde.org bugs at horde.org
Fri Nov 30 11:40:32 UTC 2012


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/11671
------------------------------------------------------------------------------
  Ticket             | 11671
  Updated By         | software-horde at interfasys.ch
  Summary            | The dynamic view crashes on some Inboxes
  Queue              | IMP
  Version            | 6.0.1
  Type               | Bug
  State              | Not A Bug
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


software-horde at interfasys.ch (2012-11-30 11:40) wrote:

> That should be up to the programmer to determine.  I don't want the  
> programming language enforcing arbitrary limits.
>
> If a programmer wants to shoot themselves in the foot - that is  
> their prerogative.  But this limit makes certain tasks impossible,  
> especially when the input data size is unknown (say, for example, an  
> e-mail message where the PHP programmer has no control over limiting  
> this input size).
>
I've been doing some reading:
https://bugs.php.net/bug.php?id=45546
http://stackoverflow.com/questions/7620910/regexp-in-preg-match-function-returning-browser-error

and using test scripts, I can see that some requests can fill the  
stack very quickly while others never crash PHP. So, apparently it's  
possible to write regexps to be more stack limit friendly.

These tips seem to help:
- use possessive quantifiers where possible. This means: ++, *+, ?+  
{}+ instead of +, *, ?, {}.
- move quantifiers inside of alternative-brackets where possible





More information about the bugs mailing list