> -----Original Message----- > From: Christoph Becker [mailto:cmbecke...@gmx.de] > Sent: Tuesday, August 4, 2015 1:16 PM > To: Anatol Belski <anatol....@belski.net>; 'Christoph Becker' > <cmbecke...@gmx.de>; 'Pierre Joye' <pierre....@gmail.com> > Cc: 'PHP internals' <internals@lists.php.net> > Subject: Re: [PHP-DEV] PCRE JIT stack size limit > > I didn't mean to store all patterns in both variants, but rather as > requested. Say, > the PHP script starts with pcre.jit=0, so all patterns will be stored studied > without > JIT. Then the script changes to pcre.jit=1. Following cache lookups check > whether an already cached pattern was studied with JIT. If not, a new cache > entry is made with the pattern studied with JIT (that new entry may replace > the > old one or not; not sure what's best). Changing back to pcre.jit=0 will again > keep the old patterns, but ensures that only those which have been studied > without JIT are retrieved from the cache. > It needs to replace the old entry, the regex string is used as key. At least per current mechanism. When user changes the JIT config, I'd see it like as an obvious hint. Like pcre.jit=0 - no more JIT study from now on. Probably it would be needed to save the study flags with the cache entry, looks like the pcre_cache_entry struct should have a gap for that. But actually sounds like an approach.
Regards Anatol -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php