Re: [PHP-DEV] Re: clarification on maximum string sizes in PHP on 64 bit linux

2009-11-20 Thread jvlad
> The problem with the segfault in memcpy from bug 50207 was that the > pointer result->value.str.val is a 64 bit unsigned integer, and of > course result->value.str.len is a signed 32 bit integer. The value of you're right, len is declared as int and it's indeed 32bit under 64bit Linux. It must

Re: [PHP-DEV] Re: clarification on maximum string sizes in PHP on 64 bit linux

2009-11-19 Thread Matt Wirges
On Thu, Nov 19, 2009 at 4:52 PM, jvlad wrote: >> Code: >> > $s = str_repeat('A', pow(2,30)); >> $t = $s.str_repeat('B', pow(2,30));; // fails with segfault >> printf("strlen: %u last-char: %s", strlen($s), substr($s, pow(2,30)-1)); >> ?> >> --- >> Result: >> ./sapi/cli/php -d memory_limit=-1 a2.ph