[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-internals
Subject:    [PHP-DEV] Re: PCRE JIT stack size limit
From:       Christoph Becker <cmbecker69 () gmx ! de>
Date:       2015-07-24 18:14:40
Message-ID: 55B28090.8040405 () gmx ! de
[Download RAW message or body]

On 23.07.2015 at 13:07, Christoph Becker wrote:

> PHP7 supports PCRE's JIT compilation of patterns by default, which
> mostly works fine.  However, there are issues when the matching exceeds
> the JIT stack limit, see bug #70110[1].
> 
> I'm not sure how to solve this best.  Basically, I see two possible
> solutions: either we fall back to non JIT matching, if pcre_exec() fails
> with PCRE_ERROR_JIT_STACKLIMIT, or we use a custom JIT stack and make
> its size a configurable ini setting (similar to pcre.backtrack_limit),
> and raise E_WARNING if the matching fails due to limited stack size.
> 
> Thoughts?
> 
> [1] <https://bugs.php.net/bug.php?id=70110>

Zoltán Herczeg just told me that the size of the JIT stack doesn't have
to be fixed, but rather allows to dynamically grow up to a maximum given
size (preallocated by mmap/VirtualAlloc).  I'll do some testing and
report back later.

-- 
Christoph M. Becker

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic