Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71068 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3068 invoked from network); 11 Jan 2014 16:08:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2014 16:08:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.180 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.216.180 mail-qc0-f180.google.com Received: from [209.85.216.180] ([209.85.216.180:65326] helo=mail-qc0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C7/50-01384-D7C61D25 for ; Sat, 11 Jan 2014 11:08:29 -0500 Received: by mail-qc0-f180.google.com with SMTP id i17so20809qcy.25 for ; Sat, 11 Jan 2014 08:08:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=eG9xxSptYyifR6ic/ww3x77VASIKp0o0c00HMpViCxo=; b=R1eudpcgayw3Tn77l3/qSVVDFZpx0cFL/kziiPT4boOMS7K00zKiHq116n1tisR057 xJdSJw2ZICYY1S/TEYWpAN7i5YNG4sPO/QcDdh8Iu3rR2mq8uHbYvb7hwS2fJpXvFhYd WaqAm6HULz1WfO03V9D12x5dTeOe3nOgjskh10yFp7N+ZvsWB9y6GQjMuMxTyq4Gu/4o DkjwOSsJpqRnh6JK9ky0SCKSyDibfOBvZxSljrrZ/KtVtNX9HoLZAFdbnGYqPschpiIU HStYBAv8wUtyfXPayWNWlcgRlgxnfZ34vsxi1UK3a5h5/dlmlcg1uXXEC9AZaUP+bBbo cgUg== MIME-Version: 1.0 X-Received: by 10.224.66.134 with SMTP id n6mr20219239qai.39.1389456507070; Sat, 11 Jan 2014 08:08:27 -0800 (PST) Sender: jakub.php@gmail.com Received: by 10.224.68.68 with HTTP; Sat, 11 Jan 2014 08:08:26 -0800 (PST) In-Reply-To: <2e9df2840916d6e72255764a08086e57.squirrel@webmail.klapt.com> References: <10f19e40b03ee19837010a988eb05706.squirrel@webmail.klapt.com> <2e9df2840916d6e72255764a08086e57.squirrel@webmail.klapt.com> Date: Sat, 11 Jan 2014 16:08:26 +0000 X-Google-Sender-Auth: z51UK5FX1_XVOqTOoGIIui5DqvM Message-ID: To: Anatol Belski Cc: Hannes Magnusson , Nikita Popov , PHP Developers Mailing List Content-Type: multipart/alternative; boundary=001a11c2bd8488ee5f04efb40d23 Subject: Re: [PHP-DEV] [RFC] 64 bit platform improvements for string length and integer From: bukka@php.net (Jakub Zelenka) --001a11c2bd8488ee5f04efb40d23 Content-Type: text/plain; charset=ISO-8859-1 On Sat, Jan 11, 2014 at 3:29 PM, Anatol Belski wrote: > > yep, that's exactly how it performs till now in the mainstream, just > replace ZEND_INT_MAX with LONG_MAX. Adding a warning to every such case > would cause a warning flood in many PHP apps, guaranteed :) Whereby it > might be ok for debug mode maybe, I wouldn't do it as I can't remember any > WTFs about the behavior. > > I meant adding warning only for overflow cases. Values in existing apps can't be bigger than LONG_MAX so I don't see how it could cause warning flood in the current PHP apps. I don't even think that users will be often using such a big values after the 64bit changes. The thing is that if I use value bigger than LONG_MAX after 64bit changes and I pass it to the function defined in extension that does not support it (use "l" in zpp), then I rather see warning than unexpected rounding to LONG_MAX... There is no way how to find out (except looking to the ext sources) that the big values are not supported. If I get warning, I can fix it in the code straight away... The another thing is that this checking needs to be done by other libraries wrappers after getting parameters because the most libraries using smaller types. That was exactly what I did when I worked on openssl ext for 64bit and I will need to do it in my fann and crypto extension. There are bunch of other extensions that will need to do it too (for example imagick). The difference with openssl changes is that the BC will need to be kept. I am sure that if warnings were already in zend_parse_arg_impl, then the work for supporting 64bit branch would much easier for me and other PECL extension maintainers... Cheers Jakub --001a11c2bd8488ee5f04efb40d23--