Re: [PHP-DEV] String Size Refactor Progress

2013-07-10 Thread Anatol Belski
Hi, On Wed, July 10, 2013 07:51, Pierre Joye wrote: >> Substr needs to be refactored to use size_t. Right now, I just raise an >> error if Z_STRSIZE > INT_MAX (or an overflow would happen). I'd love >> to see that cleaned up more. > > We should consider moving to int64_t too as well while being a

Re: [PHP-DEV] String Size Refactor Progress

2013-07-09 Thread Pierre Joye
hi Anthony! On Wed, Jul 3, 2013 at 4:12 PM, Anthony Ferrara wrote: > Hey all, > > So I've started the refactor to change the stored string size from int to > size_t. Great work so far! Thanks! :) > I've got it compiling and the tests mostly passing (not all), when run with > --disable-all and

Re: [PHP-DEV] String Size Refactor Progress

2013-07-03 Thread Pierre Joye
Hi Yasuo, On Jul 4, 2013 5:54 AM, "Yasuo Ohgaki" wrote: > > Hi Anthony, > > 2013/7/3 Anthony Ferrara > > > I've migrated php_pcre.c over, but pcrelib still uses int for string sizes. > > This is going to be a much larger refactor, and I wanted to see people's > > thoughts prior to digging into i

Re: [PHP-DEV] String Size Refactor Progress

2013-07-03 Thread Yasuo Ohgaki
Hi Anthony, 2013/7/3 Anthony Ferrara > I've migrated php_pcre.c over, but pcrelib still uses int for string sizes. > This is going to be a much larger refactor, and I wanted to see people's > thoughts prior to digging into it. > For upgradability and compatibility, bundled pcrelib should be lef

Re: [PHP-DEV] String Size Refactor Progress

2013-07-03 Thread Stas Malyshev
Hi! > The problem is that changing 's' from int to size_t can (and does) cause > segfaults. But if we refactor string lengths to be size_t, we can not allow code that still relies on it being int, if sizeof(size_t) != sizeof(int). It would just produce wrong length. I'd actually prefer segfault

Re: [PHP-DEV] String Size Refactor Progress

2013-07-03 Thread Anthony Ferrara
Chris, When `--enable-zstrlen` is not enabled, I disable s and p, and changed ZPP >> to rase an E_ERROR on unknown parameter types. The E_ERROR change is not >> intended to go into production, but instead just makes life A LOT easier >> refactoring modules one at a time. >> > > Can you elaborate

Re: [PHP-DEV] String Size Refactor Progress

2013-07-03 Thread Christopher Jones
On 07/03/2013 07:12 AM, Anthony Ferrara wrote: Then, I defined a series of new types: #ifdef ZEND_USE_LEGACY_STRING_TYPES Due to a problem with zend_parse_parameters, I added two new identifiers: S and P. They act just like s and p, except that they return zend_str_size instead of int. Wh

Re: [PHP-DEV] String Size Refactor Progress

2013-07-03 Thread Michael Wallner
On Jul 3, 2013 4:12 PM, "Anthony Ferrara" wrote: > > If you want to help out, please let me know and let's try to coordinate so > we don't step on each other's toes... > I'm with you from August 1st, at the latest! > Thanks! > > Anthony

[PHP-DEV] String Size Refactor Progress

2013-07-03 Thread Anthony Ferrara
Hey all, So I've started the refactor to change the stored string size from int to size_t. I've got it compiling and the tests mostly passing (not all), when run with --disable-all and --disable-cgi. There are definitely still issues with the patch (there are some weird segfaults in certain time