Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46126 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1222 invoked from network); 20 Nov 2009 12:31:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Nov 2009 12:31:29 -0000 X-Host-Fingerprint: 95.31.13.88 xdmitri2.static.corbina.ru Received: from [95.31.13.88] ([95.31.13.88:27007] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/81-25743-02C860B4 for ; Fri, 20 Nov 2009 07:31:28 -0500 Message-ID: <81.81.25743.02C860B4@pb1.pair.com> To: internals@lists.php.net References: <13.A3.65535.03CC50B4@pb1.pair.com> Date: Fri, 20 Nov 2009 15:31:22 +0300 Lines: 16 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Original X-Posted-By: 95.31.13.88 Subject: Re: [PHP-DEV] Re: clarification on maximum string sizes in PHP on 64 bit linux From: dmda@yandex.ru ("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 be changed to long in order to have proper arithmetic with strings longer than 0x7fffffff bytes. I think it can't be changed in neither 5.2 nor 5.3, or it will break binary compatibility. Perhaps the change should be submited into 5.4 and 6.0 branches. -jv