Re: [PHP-DEV] PCRE JIT stack size limit

2016-03-21 Thread David Zuelke
On 21.03.2016, at 23:44, Anatol Belski wrote: > > What I'm suggesting to do is using a bit finer comb checking with the real > life situations. Fe what would be the win for the user, either having to > enable JIT by hand, or to disable it in a rare case. Currently, as for me, > the latter seems s

RE: [PHP-DEV] PCRE JIT stack size limit

2016-03-21 Thread Anatol Belski
Hi David, > -Original Message- > From: David Zuelke [mailto:d...@heroku.com] > Sent: Monday, March 21, 2016 10:52 PM > To: Anatol Belski > Cc: Christoph Becker ; Pierre Joye > ; PHP internals > Subject: Re: [PHP-DEV] PCRE JIT stack size limit > > On 21.03.20

Re: [PHP-DEV] PCRE JIT stack size limit

2016-03-21 Thread David Zuelke
On 21.03.2016, at 19:41, Anatol Belski wrote: > I've just pushed a fix for this issue, could you please check? A global > stack space > Is used in a thread safe manner. I was first setting max to 256K, then > decreased it > To 64K for now. My tests on Linux and Windows show your snippet passing, >

RE: [PHP-DEV] PCRE JIT stack size limit

2016-03-21 Thread Anatol Belski
Hi, > -Original Message- > From: Nikita Popov [mailto:nikita@gmail.com] > Sent: Monday, March 21, 2016 7:54 PM > To: Anatol Belski > Cc: David Zuelke ; Christoph Becker ; > Pierre Joye ; PHP internals > Subject: Re: [PHP-DEV] PCRE JIT stack size limit >

Re: [PHP-DEV] PCRE JIT stack size limit

2016-03-21 Thread David Zuelke
On 21.03.2016, at 19:54, Nikita Popov wrote: > > On Mon, Mar 21, 2016 at 7:41 PM, Anatol Belski wrote: >> The issue I have with more increasing the stack is that - while as we see >> till today >> the default stack size of 32K is enough in the common case, the max of it >> will be >> reserved. S

Re: [PHP-DEV] PCRE JIT stack size limit

2016-03-21 Thread Nikita Popov
@heroku.com] > > >> Sent: Sunday, March 20, 2016 10:10 PM > > >> To: Anatol Belski > > >> Cc: Christoph Becker ; Pierre Joye > > >> ; PHP internals > > >> Subject: Re: [PHP-DEV] PCRE JIT stack size limit > > >> > > >>

RE: [PHP-DEV] PCRE JIT stack size limit

2016-03-21 Thread Anatol Belski
Hi, > -Original Message- > From: David Zuelke [mailto:d...@heroku.com] > Sent: Monday, March 21, 2016 12:30 AM > To: Anatol Belski > Cc: Christoph Becker ; Pierre Joye > ; PHP internals > Subject: Re: [PHP-DEV] PCRE JIT stack size limit > > > > On 20

Re: [PHP-DEV] PCRE JIT stack size limit

2016-03-20 Thread David Zuelke
-Original Message- >>>>> From: David Zuelke [mailto:d...@heroku.com] >>>>> Sent: Tuesday, March 15, 2016 11:58 PM >>>>> To: Anatol Belski >>>>> Cc: Christoph Becker ; Pierre Joye >>>>> ; PHP internals >>>>>

RE: [PHP-DEV] PCRE JIT stack size limit

2016-03-20 Thread Anatol Belski
Hi, > -Original Message- > From: David Zuelke [mailto:d...@heroku.com] > Sent: Sunday, March 20, 2016 10:10 PM > To: Anatol Belski > Cc: Christoph Becker ; Pierre Joye > ; PHP internals > Subject: Re: [PHP-DEV] PCRE JIT stack size limit > > > On 17.0

Re: [PHP-DEV] PCRE JIT stack size limit

2016-03-20 Thread David Zuelke
>>> To: Anatol Belski >>> Cc: Christoph Becker ; Pierre Joye >>> ; PHP internals >>> Subject: Re: [PHP-DEV] PCRE JIT stack size limit >>> >>> Sure. So composer creates patterns to parse a file dynamically; I have not >>> figured out why

Re: [PHP-DEV] PCRE JIT stack size limit

2016-03-19 Thread David Zuelke
> On 16.03.2016, at 21:38, Anatol Belski wrote: > > Hi, > >> -Original Message- >> From: David Zuelke [mailto:d...@heroku.com] >> Sent: Tuesday, March 15, 2016 11:58 PM >> To: Anatol Belski >> Cc: Christoph Becker ; Pierre Joye >> ; P

RE: [PHP-DEV] PCRE JIT stack size limit

2016-03-19 Thread Anatol Belski
Hi, > -Original Message- > From: David Zuelke [mailto:d...@heroku.com] > Sent: Tuesday, March 15, 2016 11:58 PM > To: Anatol Belski > Cc: Christoph Becker ; Pierre Joye > ; PHP internals > Subject: Re: [PHP-DEV] PCRE JIT stack size limit > > Sure. So compose

Re: [PHP-DEV] PCRE JIT stack size limit

2016-03-15 Thread David Zuelke
have a reproducer and > evaluate the status. Then we'll have a point for further consideration. > > Thanks > > Anatol > >> >>> On 04.08.2015, at 23:20, Anatol Belski wrote: >>> >>> Hi Christoph, >>> >>>>

RE: [PHP-DEV] PCRE JIT stack size limit

2016-03-15 Thread Anatol Belski
Hi, > -Original Message- > From: David Zuelke [mailto:d...@heroku.com] > Sent: Sunday, March 13, 2016 6:09 AM > To: Anatol Belski > Cc: Christoph Becker ; Pierre Joye > ; PHP internals > Subject: Re: [PHP-DEV] PCRE JIT stack size limit > > Just wanted to resu

Re: [PHP-DEV] PCRE JIT stack size limit

2016-03-12 Thread David Zuelke
ailto:cmbecke...@gmx.de] >> Sent: Tuesday, August 4, 2015 7:40 PM >> To: Anatol Belski ; 'Christoph Becker' >> ; 'Pierre Joye' >> Cc: 'PHP internals' >> Subject: Re: [PHP-DEV] PCRE JIT stack size limit >> >> On 04.08.2015

RE: [PHP-DEV] PCRE JIT stack size limit

2015-08-04 Thread Anatol Belski
Hi Christoph, > -Original Message- > From: Christoph Becker [mailto:cmbecke...@gmx.de] > Sent: Tuesday, August 4, 2015 7:40 PM > To: Anatol Belski ; 'Christoph Becker' > ; 'Pierre Joye' > Cc: 'PHP internals' > Subject: Re: [PHP-DEV] PC

Re: [PHP-DEV] PCRE JIT stack size limit

2015-08-04 Thread Christoph Becker
On 04.08.2015 at 16:33, Anatol Belski wrote: >> -Original Message- >> From: Christoph Becker [mailto:cmbecke...@gmx.de] >> Sent: Tuesday, August 4, 2015 1:16 PM >> To: Anatol Belski ; 'Christoph Becker' >> ; 'Pierre Joye' >> Cc: &

RE: [PHP-DEV] PCRE JIT stack size limit

2015-08-04 Thread Anatol Belski
> -Original Message- > From: Christoph Becker [mailto:cmbecke...@gmx.de] > Sent: Tuesday, August 4, 2015 1:16 PM > To: Anatol Belski ; 'Christoph Becker' > ; 'Pierre Joye' > Cc: 'PHP internals' > Subject: Re: [PHP-DEV] PCRE JIT stack

Re: [PHP-DEV] PCRE JIT stack size limit

2015-08-04 Thread Christoph Becker
27;Pierre Joye' >> Cc: 'PHP internals' >> Subject: Re: [PHP-DEV] PCRE JIT stack size limit >> >> On 27.07.2015 at 13:28, Anatol Belski wrote: >> >>>> -Original Message- >>>> From: Christoph Becker [mailto:cmbecke..

RE: [PHP-DEV] PCRE JIT stack size limit

2015-08-04 Thread Anatol Belski
Hi Christoph, > -Original Message- > From: Christoph Becker [mailto:cmbecke...@gmx.de] > Sent: Tuesday, August 4, 2015 2:35 AM > To: Anatol Belski ; 'Christoph Becker' > ; 'Pierre Joye' > Cc: 'PHP internals' > Subject: Re: [PHP-DEV] PC

Re: [PHP-DEV] PCRE JIT stack size limit

2015-08-03 Thread Christoph Becker
On 27.07.2015 at 13:28, Anatol Belski wrote: >> -Original Message- >> From: Christoph Becker [mailto:cmbecke...@gmx.de] >> Sent: Monday, July 27, 2015 12:06 AM >> To: Anatol Belski ; 'Pierre Joye' >> >> Cc: 'PHP internals&#x

RE: [PHP-DEV] PCRE JIT stack size limit

2015-07-27 Thread Anatol Belski
Hi Christoph, > -Original Message- > From: Christoph Becker [mailto:cmbecke...@gmx.de] > Sent: Monday, July 27, 2015 12:06 AM > To: Anatol Belski ; 'Pierre Joye' > > Cc: 'PHP internals' > Subject: Re: [PHP-DEV] PCRE JIT stack size limit &g

Re: [PHP-DEV] PCRE JIT stack size limit

2015-07-26 Thread Christoph Becker
Hi Anatol, Anatol Belski wrote: > Hi Christoph, > >> -Original Message- >> From: Christoph Becker [mailto:cmbecke...@gmx.de] >> Sent: Saturday, July 25, 2015 6:02 PM >> To: Anatol Belski ; 'Pierre Joye' >> >> Cc: 'PHP intern

RE: [PHP-DEV] PCRE JIT stack size limit

2015-07-26 Thread Anatol Belski
Hi Christoph, > -Original Message- > From: Christoph Becker [mailto:cmbecke...@gmx.de] > Sent: Saturday, July 25, 2015 6:02 PM > To: Anatol Belski ; 'Pierre Joye' > > Cc: 'PHP internals' > Subject: Re: [PHP-DEV] PCRE JIT stack size limit

Re: [PHP-DEV] PCRE JIT stack size limit

2015-07-25 Thread Christoph Becker
Hi Anatol, Anatol Belski wrote: >> -Original Message- >> From: Christoph Becker [mailto:cmbecke...@gmx.de] >> Sent: Saturday, July 25, 2015 2:25 AM >> To: Anatol Belski ; 'Pierre Joye' >> >> Cc: 'PHP internals' >> Subj

RE: [PHP-DEV] PCRE JIT stack size limit

2015-07-25 Thread Anatol Belski
Hi Christoph, > -Original Message- > From: Christoph Becker [mailto:cmbecke...@gmx.de] > Sent: Saturday, July 25, 2015 2:25 AM > To: Anatol Belski ; 'Pierre Joye' > > Cc: 'PHP internals' > Subject: Re: [PHP-DEV] PCRE JIT stack size limit

Re: [PHP-DEV] PCRE JIT stack size limit

2015-07-24 Thread Christoph Becker
Hi Anatol, Anatol Belski wrote: > Hi Christoph, > >> -Original Message- >> From: Christoph Becker [mailto:cmbecke...@gmx.de] >> Sent: Saturday, July 25, 2015 12:09 AM >> To: Anatol Belski ; 'Pierre Joye' >> >> Cc: 'PHP intern

RE: [PHP-DEV] PCRE JIT stack size limit

2015-07-24 Thread Anatol Belski
Hi Christoph, > -Original Message- > From: Christoph Becker [mailto:cmbecke...@gmx.de] > Sent: Saturday, July 25, 2015 12:09 AM > To: Anatol Belski ; 'Pierre Joye' > > Cc: 'PHP internals' > Subject: Re: [PHP-DEV] PCRE JIT stack size limit

Re: [PHP-DEV] PCRE JIT stack size limit

2015-07-24 Thread Christoph Becker
Hi Anatol, Anatol Belski wrote: > This looks like an extremely fragile topic because it depends on how > much stack is available to an executable. A custom JIT stack can > behave more stable but cannot be resized. And the main issue is that > the JIT stack size, machine stack size and ext/pcre ca

RE: [PHP-DEV] PCRE JIT stack size limit

2015-07-24 Thread Anatol Belski
Hi Christoph, > -Original Message- > From: Christoph Becker [mailto:cmbecke...@gmx.de] > Sent: Thursday, July 23, 2015 8:47 PM > To: Pierre Joye > Cc: PHP internals > Subject: Re: [PHP-DEV] PCRE JIT stack size limit > > Hi Pierre, > > Pierre J

Re: [PHP-DEV] PCRE JIT stack size limit

2015-07-24 Thread Christoph Becker
On 24.07.2015 at 14:32, David Zuelke wrote: > On 24.07.2015, at 09:33, Adam Harvey wrote: >> >> On 23 July 2015 at 11:47, Christoph Becker wrote: >> >>> Therefore I tend to prefer a new ini setting (say, pcre.jitstack_limit). >>> That would mean, however, to add yet another ini setting, of whic

Re: [PHP-DEV] PCRE JIT stack size limit

2015-07-24 Thread Pierre Joye
On Jul 24, 2015 3:32 PM, "David Zuelke" wrote: > > On 24.07.2015, at 09:33, Adam Harvey wrote: > > > > On 23 July 2015 at 11:47, Christoph Becker wrote: > > > >> Therefore I tend to prefer a new ini setting (say, pcre.jitstack_limit). > >> That would mean, however, to add yet another ini settin

Re: [PHP-DEV] PCRE JIT stack size limit

2015-07-24 Thread David Zuelke
On 24.07.2015, at 09:33, Adam Harvey wrote: > > On 23 July 2015 at 11:47, Christoph Becker wrote: > >> Therefore I tend to prefer a new ini setting (say, pcre.jitstack_limit). >> That would mean, however, to add yet another ini setting, of which >> there are already so many. > > I'm not a big

Re: [PHP-DEV] PCRE JIT stack size limit

2015-07-24 Thread Christoph Becker
Christoph Becker wrote: > Adam Harvey wrote: > >> On 23 July 2015 at 11:47, Christoph Becker wrote: >> >>> Therefore I tend to prefer a new ini setting (say, pcre.jitstack_limit). >>> That would mean, however, to add yet another ini setting, of which >>> there are already so many. >> >> I'm no

Re: [PHP-DEV] PCRE JIT stack size limit

2015-07-24 Thread Christoph Becker
Adam Harvey wrote: > On 23 July 2015 at 11:47, Christoph Becker wrote: > >> Therefore I tend to prefer a new ini setting (say, pcre.jitstack_limit). >> That would mean, however, to add yet another ini setting, of which >> there are already so many. > > I'm not a big fan of that, although it's

Re: [PHP-DEV] PCRE JIT stack size limit

2015-07-24 Thread Christoph Becker
Pierre Joye wrote: > On Jul 23, 2015 9:47 PM, "Christoph Becker" wrote: >> >> Ah, I should have explained better that libpcre's JIT support is >> implemented as own virtual machine, and libpcre has functions to use a >> custom stack which is allocated on the heap. If these functions are not >> u

Re: [PHP-DEV] PCRE JIT stack size limit

2015-07-24 Thread Pierre Joye
On Jul 24, 2015 10:34 AM, "Adam Harvey" wrote: > > On 23 July 2015 at 11:47, Christoph Becker wrote: > > > Therefore I tend to prefer a new ini setting (say, pcre.jitstack_limit). > > That would mean, however, to add yet another ini setting, of which > > there are already so many. > > I'm not a

Re: [PHP-DEV] PCRE JIT stack size limit

2015-07-24 Thread Adam Harvey
On 23 July 2015 at 11:47, Christoph Becker wrote: > Therefore I tend to prefer a new ini setting (say, pcre.jitstack_limit). > That would mean, however, to add yet another ini setting, of which > there are already so many. I'm not a big fan of that, although it's at least in the spirit of what

Re: [PHP-DEV] PCRE JIT stack size limit

2015-07-24 Thread Pierre Joye
On Jul 23, 2015 9:47 PM, "Christoph Becker" wrote: > > Hi Pierre, > > Pierre Joye wrote: > > > Hi Christoph, > > > > There are ways to dymacally increase the stack. Apache's modphp can use the > > apache config. Fpm, fcgi or cli can change it on windows (afair it is in > > the doc). It is possible

Re: [PHP-DEV] PCRE JIT stack size limit

2015-07-23 Thread Christoph Becker
Hi Pierre, Pierre Joye wrote: > Hi Christoph, > > There are ways to dymacally increase the stack. Apache's modphp can use the > apache config. Fpm, fcgi or cli can change it on windows (afair it is in > the doc). It is possible too on Linux with ulimit. > > An alternative (not a big fan) would

Re: [PHP-DEV] PCRE JIT stack size limit

2015-07-23 Thread Pierre Joye
Hi Christoph, There are ways to dymacally increase the stack. Apache's modphp can use the apache config. Fpm, fcgi or cli can change it on windows (afair it is in the doc). It is possible too on Linux with ulimit. An alternative (not a big fan) would be to use setrlimit with an ini setting. Chee

[PHP-DEV] PCRE JIT stack size limit

2015-07-23 Thread Christoph Becker
Hi! 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 matc