Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67645 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54040 invoked from network); 7 Jun 2013 14:27:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jun 2013 14:27:44 -0000 Authentication-Results: pb1.pair.com header.from=ab@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ab@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.73.107 as permitted sender) X-PHP-List-Original-Sender: ab@php.net X-Host-Fingerprint: 85.214.73.107 klapt.com Received: from [85.214.73.107] ([85.214.73.107:44474] helo=h1123647.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C5/83-33815-ADDE1B15 for ; Fri, 07 Jun 2013 10:27:43 -0400 Received: by h1123647.serverkompetenz.net (Postfix, from userid 33) id 32D216BC75A; Fri, 7 Jun 2013 16:27:35 +0200 (CEST) Received: from 94.216.54.153 (SquirrelMail authenticated user anatol@belski.net) by webmail.klapt.com with HTTP; Fri, 7 Jun 2013 16:27:35 +0200 Message-ID: <403fdf67ff181b70e4f3343f042572a7.squirrel@webmail.klapt.com> In-Reply-To: References: <6dd0f0c5be06dc0713890f2000a0b551.squirrel@webmail.klapt.com> Date: Fri, 7 Jun 2013 16:27:35 +0200 To: "Derick Rethans" Cc: "Anatol Belski" , =?UTF-8?Q?=22Johannes_Schl=C3=BCter=22?= , "Stas Malyshev" , "PHP internals" Reply-To: "Anatol Belski" User-Agent: SquirrelMail/1.5.2 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Re: #53437 From: ab@php.net ("Anatol Belski") Hi Derick, On Fri, June 7, 2013 14:06, Derick Rethans wrote: > On Fri, 7 Jun 2013, Anatol Belski wrote: > > >> On Fri, June 7, 2013 12:45, Derick Rethans wrote: >> >>> On Thu, 6 Jun 2013, Pierre Joye wrote: >>> >>> >>> >>>> On Jun 6, 2013 6:03 PM, "Derick Rethans" wrote: >>>> >>>> >>>>> On Thu, 6 Jun 2013, Pierre Joye wrote: >>>>> >>>>> >>>>>> The fix for #53437 is around for some time now. It full fills >>>>>> the requirements described by Derick when we discussed the >>>>>> possible fixes. >>>>>> >>>>>> Unless there are strong objections in the next couple of days, >>>>>> I >>>>>> will ask Anatol to apply it on Monday. This is the last >>>>>> remaining crash in 5.3/4 (already applied in 5.5) and needs to >>>>>> be fixed asap. >>>>> >>>>> The last time I checked that it was using weird base64 encoding >>>>> on stuff and I am absolutely against that. Where is the new patch? >>>>> >>>> >>>> It is in 5.5 and no, it does not used that as stated in the >>>> previous mails. >>> >>> That didn't answer my question though. I asked where the new patch >>> was. >> >> That's the one where conversion int <> string for serialization was >> developed. It came into 5.5 with this patches (the originally proposed >> patch is still attached to that ticket) >> >> http://git.php.net/?p=php-src.git;a=commitdiff;h=0ee71557ffd285552659b6 >> aa37ea236e3bad493f > > ["days"]=> > - int(3) > + string(1) "3" > > > and > > - 'days' => 0, > + 'days' => '0', > > > I see this in all test cases - this is a BC break. Even though days is > an int64, I think this should be a (platform) int and not a string in case > it fits. No need to punish people on 64bit platforms. I'd even go as far > as arguing that special_amount should be treated like that too. The > deserializer needs to understand both types anyway. > Just to be said that the idea from the original patch with base64 encoding was to export all the data without possible losses on 32 and 64 bit, besides fixing the crash. So I just continued that way. Exporting a 64 int as long can shrink the serialized value. This is anyway easy fixable by changing the macros. Also exporting even a shrinked value wouldn't cause a crash. Do I get it right we can backport it for 5.3/5.4 when it's fixed? Cheers Anatol